diff --git a/doc/index.html b/doc/index.html index 53ad841..c4853a9 100644 --- a/doc/index.html +++ b/doc/index.html @@ -2,7 +2,7 @@ index - + @@ -11,7 +11,7 @@

OCaml package documentation

    -
  1. ocaml-version v3.6.3
  2. +
  3. ocaml-version v3.6.4
diff --git a/doc/ocaml-version/Ocaml_version/.dummy b/doc/ocaml-version/Ocaml_version/.dummy deleted file mode 100644 index e69de29..0000000 diff --git a/doc/ocaml-version/Ocaml_version/Configure_options/index.html b/doc/ocaml-version/Ocaml_version/Configure_options/index.html index 81dd7d0..be37f1d 100644 --- a/doc/ocaml-version/Ocaml_version/Configure_options/index.html +++ b/doc/ocaml-version/Ocaml_version/Configure_options/index.html @@ -1,2 +1,2 @@ -Configure_options (ocaml-version.Ocaml_version.Configure_options)

Module Ocaml_version.Configure_options

Configuration parameters that affect the behaviour of OCaml at compiler-build-time.

type o = [
  1. | `Afl
  2. | `Default_unsafe_string
  3. | `Disable_flat_float_array
  4. | `Domains
  5. | `Effects
  6. | `Flambda
  7. | `Force_safe_string
  8. | `Frame_pointer
  9. | `Multicore
  10. | `Multicore_no_effect_syntax
  11. | `No_naked_pointers
  12. | `No_naked_pointers_checker
]

Configuration options available at compiler build time.

val to_string : o -> string

to_string o returns a compact representation of o suitable for use in opam version strings.

val of_string : string -> o option

of_string s will parse the output of to_string back into an option o. Returns None if the string input is unknown.

val of_t : t -> (o list, [> `Msg of string ]) Stdlib.result

of_t t will parse the extra field of t and return a list of configure options that it represents. Unknown options in the extra field will result in an Error being returned.

val to_t : t -> o list -> t

to_t t ol will replace the extra field of t with the list of options represented in ol.

val to_description : o -> string

to_description o returns a human-readable representation of o.

val to_configure_flag : t -> o -> string

to_configure_flag o returns a string that can be passed to OCaml's configure script to activate that feature.

val compare : t -> o -> o -> int

compare t a b will return -1 if a is < b, 0 if they are equal, or 1 if a > b. For backwards compatibility reasons, Frame_pointer always comes first in comparisons before OCaml 4.12.0, and is lexically ordered after 4.12.0. The t argument will determine which comparison function to use.

val equal : t -> o -> o -> bool

equal t a b will return true if a=b for a given OCaml version t.

val is_multicore : t -> bool

is_multicore t is true if this version is a multicore-capable release.

\ No newline at end of file +Configure_options (ocaml-version.Ocaml_version.Configure_options)

Module Ocaml_version.Configure_options

Configuration parameters that affect the behaviour of OCaml at compiler-build-time.

type o = [
  1. | `Afl
  2. | `Default_unsafe_string
  3. | `Disable_flat_float_array
  4. | `Domains
  5. | `Effects
  6. | `Flambda
  7. | `Force_safe_string
  8. | `Frame_pointer
  9. | `Multicore
  10. | `Multicore_no_effect_syntax
  11. | `No_naked_pointers
  12. | `No_naked_pointers_checker
]

Configuration options available at compiler build time.

val to_string : o -> string

to_string o returns a compact representation of o suitable for use in opam version strings.

val of_string : string -> o option

of_string s will parse the output of to_string back into an option o. Returns None if the string input is unknown.

val of_t : t -> (o list, [> `Msg of string ]) Stdlib.result

of_t t will parse the extra field of t and return a list of configure options that it represents. Unknown options in the extra field will result in an Error being returned.

val to_t : t -> o list -> t

to_t t ol will replace the extra field of t with the list of options represented in ol.

val to_description : o -> string

to_description o returns a human-readable representation of o.

val to_configure_flag : t -> o -> string

to_configure_flag o returns a string that can be passed to OCaml's configure script to activate that feature.

val compare : t -> o -> o -> int

compare t a b will return -1 if a is < b, 0 if they are equal, or 1 if a > b. For backwards compatibility reasons, Frame_pointer always comes first in comparisons before OCaml 4.12.0, and is lexically ordered after 4.12.0. The t argument will determine which comparison function to use.

val equal : t -> o -> o -> bool

equal t a b will return true if a=b for a given OCaml version t.

val is_multicore : t -> bool

is_multicore t is true if this version is a multicore-capable release.

diff --git a/doc/ocaml-version/Ocaml_version/Has/index.html b/doc/ocaml-version/Ocaml_version/Has/index.html index 999bb80..e62aaa0 100644 --- a/doc/ocaml-version/Ocaml_version/Has/index.html +++ b/doc/ocaml-version/Ocaml_version/Has/index.html @@ -1,2 +1,2 @@ -Has (ocaml-version.Ocaml_version.Has)

Module Ocaml_version.Has

Test whether a release has a given feature.

val bytes : t -> bool

bytes t will return true if that release has a bytes type. Note that opam provides a bytes compatibility package for older releases.

val arch : arch -> t -> bool

arch a t will return true if architecture a is supported on release t.

val options_packages : t -> bool

options_packages t will return true if the release t uses ocaml-option-* packages in opam-repository, rather than +variant packages

val multicore : t -> bool

multicore t will return true if the release t has a multicore OCaml fork available for it. This requires the https://github.com/ocaml-multicore/multicore-opam opam switch to be added before the package is available.

Note that the multicore variants changed between 4.10 and 4.12, and this function returns true for any of them.

\ No newline at end of file +Has (ocaml-version.Ocaml_version.Has)

Module Ocaml_version.Has

Test whether a release has a given feature.

val bytes : t -> bool

bytes t will return true if that release has a bytes type. Note that opam provides a bytes compatibility package for older releases.

val arch : arch -> t -> bool

arch a t will return true if architecture a is supported on release t.

val options_packages : t -> bool

options_packages t will return true if the release t uses ocaml-option-* packages in opam-repository, rather than +variant packages

val multicore : t -> bool

multicore t will return true if the release t has a multicore OCaml fork available for it. This requires the https://github.com/ocaml-multicore/multicore-opam opam switch to be added before the package is available.

Note that the multicore variants changed between 4.10 and 4.12, and this function returns true for any of them.

diff --git a/doc/ocaml-version/Ocaml_version/Opam/V2/index.html b/doc/ocaml-version/Ocaml_version/Opam/V2/index.html index 7d0fb0a..af63c1b 100644 --- a/doc/ocaml-version/Ocaml_version/Opam/V2/index.html +++ b/doc/ocaml-version/Ocaml_version/Opam/V2/index.html @@ -1,2 +1,2 @@ -V2 (ocaml-version.Ocaml_version.Opam.V2)

Module Opam.V2

Opam 2.0 functions

val package : t -> string * string

package t returns the (name, version) pair corresponding to the opam2 package for that compiler version.

val additional_packages : t -> string list

additional_packages t returns the list of opam packages which need to be installed in addition to the package t.

val name : t -> string

name t returns the opam2 package for that compiler version.

val variant_switch : t -> Configure_options.o list -> t

variant_switch t cs returns an OCaml version t whose variant version field reflects the configuration options in cs

val switches : arch -> t -> t list

switches arch t returns the list of opam switches that are available for that compiler and architecture combination. For example, an x86_64 one would yield a list that includes flambda and the flambda-with-frame-pointer combinations.

\ No newline at end of file +V2 (ocaml-version.Ocaml_version.Opam.V2)

Module Opam.V2

Opam 2.0 functions

val package : t -> string * string

package t returns the (name, version) pair corresponding to the opam2 package for that compiler version.

val additional_packages : t -> string list

additional_packages t returns the list of opam packages which need to be installed in addition to the package t.

val name : t -> string

name t returns the opam2 package for that compiler version.

val variant_switch : t -> Configure_options.o list -> t

variant_switch t cs returns an OCaml version t whose variant version field reflects the configuration options in cs

val switches : arch -> t -> t list

switches arch t returns the list of opam switches that are available for that compiler and architecture combination. For example, an x86_64 one would yield a list that includes flambda and the flambda-with-frame-pointer combinations.

diff --git a/doc/ocaml-version/Ocaml_version/Opam/index.html b/doc/ocaml-version/Ocaml_version/Opam/index.html index 8874247..31136e9 100644 --- a/doc/ocaml-version/Ocaml_version/Opam/index.html +++ b/doc/ocaml-version/Ocaml_version/Opam/index.html @@ -1,2 +1,2 @@ -Opam (ocaml-version.Ocaml_version.Opam)

Module Ocaml_version.Opam

Opam compiler switches. These are available from the public opam-repository.

module V2 : sig ... end

Opam 2.0 functions

\ No newline at end of file +Opam (ocaml-version.Ocaml_version.Opam)

Module Ocaml_version.Opam

Opam compiler switches. These are available from the public opam-repository.

module V2 : sig ... end

Opam 2.0 functions

diff --git a/doc/ocaml-version/Ocaml_version/Releases/index.html b/doc/ocaml-version/Ocaml_version/Releases/index.html index d8c7243..8e4d69f 100644 --- a/doc/ocaml-version/Ocaml_version/Releases/index.html +++ b/doc/ocaml-version/Ocaml_version/Releases/index.html @@ -1,2 +1,2 @@ -Releases (ocaml-version.Ocaml_version.Releases)

Module Ocaml_version.Releases

Values representing official releases of OCaml.

val v3_07_0 : t

Version 3.07

val v3_07_1 : t

Version 3.07+1

val v3_07_2 : t

Version 3.07+2

val v3_07 : t

Latest release in the 3.07 series

val v3_08_0 : t

Version 3.08.0

val v3_08_1 : t

Version 3.08.1

val v3_08_2 : t

Version 3.08.2

val v3_08_3 : t

Version 3.08.3

val v3_08_4 : t

Version 3.08.4

val v3_08 : t

Latest release in the 3.08.x series

val v3_09_0 : t

Version 3.09.0

val v3_09_1 : t

Version 3.09.1

val v3_09_2 : t

Version 3.09.2

val v3_09_3 : t

Version 3.09.3

val v3_09 : t

Latest release in the 3.09.x series

val v3_10_0 : t

Version 3.10.0

val v3_10_1 : t

Version 3.10.1

val v3_10_2 : t

Version 3.10.2

val v3_10 : t

Latest release in the 3.10.x series

val v3_11_0 : t

Version 3.11.0

val v3_11_1 : t

Version 3.11.1

val v3_11_2 : t

Version 3.11.2

val v3_11 : t

Latest release in the 3.11.x series

val v3_12_0 : t

Version 3.12.0

val v3_12_1 : t

Version 3.12.1

val v3_12 : t

Latest release in the 3.12.x series

val v4_00_0 : t

Version 4.00.0

val v4_00_1 : t

Version 4.00.1

val v4_00 : t

Latest release in the 4.00.x series

val v4_01_0 : t

Version 4.01.0

val v4_01 : t

Latest release in the 4.01.x series

val v4_02_0 : t

Version 4.02.0

val v4_02_1 : t

Version 4.02.1

val v4_02_2 : t

Version 4.02.2

val v4_02_3 : t

Version 4.02.3

val v4_02 : t

Latest release in the 4.02.x series

val v4_03_0 : t

Version 4.03.0

val v4_03 : t

Latest release in the 4.03.x series

val v4_04_0 : t

Version 4.04.0

val v4_04_1 : t

Version 4.04.1

val v4_04_2 : t

Version 4.04.2

val v4_04 : t

Latest release in the 4.04.x series

val v4_05_0 : t

Version 4.05.0

val v4_05 : t

Latest release in the 4.05.x series

val v4_06_0 : t

Version 4.06.0

val v4_06_1 : t

Version 4.06.1

val v4_06 : t

Latest release in the 4.06.x series

val v4_07_0 : t

Version 4.07.0

val v4_07_1 : t

Version 4.07.1

val v4_07 : t

Latest release in the 4.07.x series

val v4_08_0 : t

Version 4.08.0

val v4_08_1 : t

Version 4.08.1

val v4_08 : t

Latest release in the 4.08.x series

val v4_09_0 : t

Version 4.09.0

val v4_09_1 : t

Version 4.09.1

val v4_09 : t

Latest release in the 4.09.x series

val v4_10_0 : t

Version 4.10.0

val v4_10_1 : t

Version 4.10.1

val v4_10_2 : t

Version 4.10.2

val v4_10 : t

Latest release in the 4.10.x series

val v4_11_0 : t

Version 4.11.0

val v4_11_1 : t

Version 4.11.1

val v4_11_2 : t

Version 4.11.2

val v4_11 : t

Latest release in the 4.11.x series

val v4_12_0 : t

Version 4.12.0

val v4_12_1 : t

Version 4.12.1

val v4_12 : t

Latest release in the 4.12.x series

val v4_13_0 : t

Version 4.13.0

val v4_13_1 : t

Version 4.13.1

val v4_13 : t

Latest release in the 4.13.x series

val v4_14_0 : t

Version 4.14.0

val v4_14_1 : t

Version 4.14.1

val v4_14 : t

Latest release in the 4.14.x series

val v5_0_0 : t

Version 5.0.0

val v5_0 : t

Latest release in the 5.0.x series

val v5_1_0 : t

Version 5.1.0

val v5_1 : t

Latest release in the 5.1.x series

val v5_2_0 : t

Version 5.2.0

val v5_2 : t

Latest release in the 5.2.x series

val all_patches : t list

all_patches is an enumeration of all OCaml releases, including every patch release. To get the major and minor releases with the latest patch version, use all instead.

val all : t list

all is an enumeration of all the OCaml releases, with the latest patch versions in each major and minor release.

val unreleased_betas : t list

Enumerates the latest beta / release-candidate versions for each unreleased minor OCaml series.

val dev : t list

Enumeration of the latest development OCaml releases. This is usually just one, but may include two active dev versions if a release branch has just been cut.

val latest : t

latest is the most recent stable release of OCaml.

val recent : t list

recent are the stable OCaml releases since 4.02, with each at the latest patch level. This is the set that is most reliably tested in the opam package repository.

val recent_with_dev : t list

recent_with_dev are the OCaml releases since 4.02 and the latest development branches.

val trunk : t

trunk is the version of the trunk branch in the OCaml repository.

val is_dev : t -> bool

is_dev t will return true if the release t represents a development release instead of a stable archive.

\ No newline at end of file +Releases (ocaml-version.Ocaml_version.Releases)

Module Ocaml_version.Releases

Values representing official releases of OCaml.

val v3_07_0 : t

Version 3.07

val v3_07_1 : t

Version 3.07+1

val v3_07_2 : t

Version 3.07+2

val v3_07 : t

Latest release in the 3.07 series

val v3_08_0 : t

Version 3.08.0

val v3_08_1 : t

Version 3.08.1

val v3_08_2 : t

Version 3.08.2

val v3_08_3 : t

Version 3.08.3

val v3_08_4 : t

Version 3.08.4

val v3_08 : t

Latest release in the 3.08.x series

val v3_09_0 : t

Version 3.09.0

val v3_09_1 : t

Version 3.09.1

val v3_09_2 : t

Version 3.09.2

val v3_09_3 : t

Version 3.09.3

val v3_09 : t

Latest release in the 3.09.x series

val v3_10_0 : t

Version 3.10.0

val v3_10_1 : t

Version 3.10.1

val v3_10_2 : t

Version 3.10.2

val v3_10 : t

Latest release in the 3.10.x series

val v3_11_0 : t

Version 3.11.0

val v3_11_1 : t

Version 3.11.1

val v3_11_2 : t

Version 3.11.2

val v3_11 : t

Latest release in the 3.11.x series

val v3_12_0 : t

Version 3.12.0

val v3_12_1 : t

Version 3.12.1

val v3_12 : t

Latest release in the 3.12.x series

val v4_00_0 : t

Version 4.00.0

val v4_00_1 : t

Version 4.00.1

val v4_00 : t

Latest release in the 4.00.x series

val v4_01_0 : t

Version 4.01.0

val v4_01 : t

Latest release in the 4.01.x series

val v4_02_0 : t

Version 4.02.0

val v4_02_1 : t

Version 4.02.1

val v4_02_2 : t

Version 4.02.2

val v4_02_3 : t

Version 4.02.3

val v4_02 : t

Latest release in the 4.02.x series

val v4_03_0 : t

Version 4.03.0

val v4_03 : t

Latest release in the 4.03.x series

val v4_04_0 : t

Version 4.04.0

val v4_04_1 : t

Version 4.04.1

val v4_04_2 : t

Version 4.04.2

val v4_04 : t

Latest release in the 4.04.x series

val v4_05_0 : t

Version 4.05.0

val v4_05 : t

Latest release in the 4.05.x series

val v4_06_0 : t

Version 4.06.0

val v4_06_1 : t

Version 4.06.1

val v4_06 : t

Latest release in the 4.06.x series

val v4_07_0 : t

Version 4.07.0

val v4_07_1 : t

Version 4.07.1

val v4_07 : t

Latest release in the 4.07.x series

val v4_08_0 : t

Version 4.08.0

val v4_08_1 : t

Version 4.08.1

val v4_08 : t

Latest release in the 4.08.x series

val v4_09_0 : t

Version 4.09.0

val v4_09_1 : t

Version 4.09.1

val v4_09 : t

Latest release in the 4.09.x series

val v4_10_0 : t

Version 4.10.0

val v4_10_1 : t

Version 4.10.1

val v4_10_2 : t

Version 4.10.2

val v4_10 : t

Latest release in the 4.10.x series

val v4_11_0 : t

Version 4.11.0

val v4_11_1 : t

Version 4.11.1

val v4_11_2 : t

Version 4.11.2

val v4_11 : t

Latest release in the 4.11.x series

val v4_12_0 : t

Version 4.12.0

val v4_12_1 : t

Version 4.12.1

val v4_12 : t

Latest release in the 4.12.x series

val v4_13_0 : t

Version 4.13.0

val v4_13_1 : t

Version 4.13.1

val v4_13 : t

Latest release in the 4.13.x series

val v4_14_0 : t

Version 4.14.0

val v4_14_1 : t

Version 4.14.1

val v4_14 : t

Latest release in the 4.14.x series

val v5_0_0 : t

Version 5.0.0

val v5_0 : t

Latest release in the 5.0.x series

val v5_1_0 : t

Version 5.1.0

val v5_1 : t

Latest release in the 5.1.x series

val v5_2_0 : t

Version 5.2.0

val v5_2 : t

Latest release in the 5.2.x series

val all_patches : t list

all_patches is an enumeration of all OCaml releases, including every patch release. To get the major and minor releases with the latest patch version, use all instead.

val all : t list

all is an enumeration of all the OCaml releases, with the latest patch versions in each major and minor release.

val unreleased_betas : t list

Enumerates the latest beta / release-candidate versions for each unreleased minor OCaml series.

val dev : t list

Enumeration of the latest development OCaml releases. This is usually just one, but may include two active dev versions if a release branch has just been cut.

val latest : t

latest is the most recent stable release of OCaml.

val recent : t list

recent are the stable OCaml releases since 4.02, with each at the latest patch level. This is the set that is most reliably tested in the opam package repository.

val recent_with_dev : t list

recent_with_dev are the OCaml releases since 4.02 and the latest development branches.

val trunk : t

trunk is the version of the trunk branch in the OCaml repository.

val is_dev : t -> bool

is_dev t will return true if the release t represents a development release instead of a stable archive.

diff --git a/doc/ocaml-version/Ocaml_version/Since/index.html b/doc/ocaml-version/Ocaml_version/Since/index.html index 59e35d1..9956dab 100644 --- a/doc/ocaml-version/Ocaml_version/Since/index.html +++ b/doc/ocaml-version/Ocaml_version/Since/index.html @@ -1,2 +1,2 @@ -Since (ocaml-version.Ocaml_version.Since)

Module Ocaml_version.Since

Determine which release a feature or architecture first appeared in.

val bytes : t

bytes is the release that the Bytes module first appeared in.

val arch : arch -> t

arch a will return the first release of OCaml that the architecture was reasonably stably supported on.

val options_packages : t

options_packages t will return the first release of OCaml that uses ocaml-option-* packages in opam-repository, rather than +variant packages

\ No newline at end of file +Since (ocaml-version.Ocaml_version.Since)

Module Ocaml_version.Since

Determine which release a feature or architecture first appeared in.

val bytes : t

bytes is the release that the Bytes module first appeared in.

val arch : arch -> t

arch a will return the first release of OCaml that the architecture was reasonably stably supported on.

val options_packages : t

options_packages t will return the first release of OCaml that uses ocaml-option-* packages in opam-repository, rather than +variant packages

diff --git a/doc/ocaml-version/Ocaml_version/Sources/index.html b/doc/ocaml-version/Ocaml_version/Sources/index.html index 9c67987..e7b5aa7 100644 --- a/doc/ocaml-version/Ocaml_version/Sources/index.html +++ b/doc/ocaml-version/Ocaml_version/Sources/index.html @@ -1,2 +1,2 @@ -Sources (ocaml-version.Ocaml_version.Sources)

Module Ocaml_version.Sources

Values relating to the source code and version control of OCaml

val trunk : t

trunk is the version of the development head of the OCaml git repository.

val git_tag : t -> string
\ No newline at end of file +Sources (ocaml-version.Ocaml_version.Sources)

Module Ocaml_version.Sources

Values relating to the source code and version control of OCaml

val trunk : t

trunk is the version of the development head of the OCaml git repository.

val git_tag : t -> string
diff --git a/doc/ocaml-version/Ocaml_version/index.html b/doc/ocaml-version/Ocaml_version/index.html index 8802745..4b944f7 100644 --- a/doc/ocaml-version/Ocaml_version/index.html +++ b/doc/ocaml-version/Ocaml_version/index.html @@ -1,2 +1,2 @@ -Ocaml_version (ocaml-version.Ocaml_version)

Module Ocaml_version

Manipulate, parse and generate OCaml version strings.

These are of the form major.minor.patch+extra, where the patch and extra fields are optional.

type t

Type of an OCaml version string

val v : ?patch:int -> ?prerelease:string -> ?extra:string -> int -> int -> t

v ?patch ?prerelease ?extra major minor will construct an OCaml version string with the appropriate parameters. The patch, prerelease, and extra indicators are optional, but it is conventional to include a patch value of 0 for most recent OCaml releases.

Parsers and serializers

val to_string : ?prerelease_sep:char -> ?sep:char -> t -> string

to_string ?sep t will convert the version t into a human-readable representation. The sep will default to the normal representation of extra version strings:

  • ~ for prerelease version
  • + otherwise This can be changed to another character by supplying sep and potentially prerelease_sep. If sep is defined but not prerelease_sep, the prerelease separator is represented by two sep characters. One such use case is to generate Docker container tags from OCaml version strings, where only dashes and alphanumeric characters are allowed.
val of_string : string -> (t, [> `Msg of string ]) Stdlib.result

of_string t will parse the version string in t. The return value is compatible with the Result combinators defined in the rresult library.

val of_string_exn : string -> t

of_string_exn t behaves as of_string but raises Invalid_argument if the string cannot be parsed.

val equal : t -> t -> bool

equal a b is the equality function for two OCaml version strings. Returns true if they are equal, false if they are not.

val compare : t -> t -> int

compare a b is the comparison function for two OCaml version strings. Returns -1 if a<b, 0 if they are equal and 1 if a>b. Comparison is done using integer comparison for the major, minor and patch versions, and lexical comparison for any extra version strings present.

val pp : Stdlib.Format.formatter -> t -> unit

pp fmt t will output a human-readable version string of t to the fmt formatter.

Architecture Support

These definitions cover the CPU architectures that OCaml runs and is supported on.

type arch = [
  1. | `I386
  2. | `X86_64
  3. | `Aarch64
  4. | `Aarch32
  5. | `Ppc64le
  6. | `S390x
  7. | `Riscv64
]

Type of CPU architectures. This is currently an incomplete list, and lists just those used by the opam test systems. Contributions welcome to complete it.

val arches : arch list

arches is an enumeration of all of the possible arch values.

val string_of_arch : arch -> string

string_of_arch arch will convert arch into a human-readable CPU architecture string. The result will follow the GOARCH convention used by Golang.

val arch_of_string : string -> (arch, [> `Msg of string ]) Stdlib.result

arch_of_string t will parse the architecture string in t. The return value is compatible with the Result combinators defined in the rresult library. This function is liberal and will attempt to understand variants of the same architecture. For example, both aarch64 and arm64 are parsed into Aarch64.

val arch_of_string_exn : string -> arch

arch_of_string_exn t is the same as arch_of_string, except that it raises Invalid_argument in case of error.

val arch_is_32bit : arch -> bool

arch_is_32bit t will return true if the architecture has a 32-bit wordsize.

val to_opam_arch : arch -> string

to_opam_arch arch will return a string that is compatible with opam's %{arch}% variable.

val of_opam_arch : string -> arch option

of_opam_arch s will try to convert s that represents an opam %{arch}% variable to an arch value.

val to_docker_arch : arch -> string

to_docker_arch arch will return a string that is compatible with a Docker multiarch property. This can be used in --platform flags to docker run, for example.

val of_docker_arch : string -> arch option

of_docker_arch s will try to convert s that represents a Docker multiarch variable to an arch value.

Accessors

val major : t -> int

major t will return the major version number of an OCaml release. For example, of_string "4.03.0" |> major will return 4.

val minor : t -> int

minor t will return the minor version number of an OCaml release. For example, of_string "4.03.0" |> minor will return 3.

val patch : t -> int option

patch t will return the patch version number of an OCaml release. For example, of_string "4.03.0" |> minor will return Some 0.

val prerelease : t -> string option

prerelease t will return the prerelease extra string of an OCaml prerelease. For example, of_string "4.12.0~beta+flambda" |> prerelease will return Some "beta".

val extra : t -> string option

extra t will return the additional information string of an OCaml release. For example, of_string "4.03.0+flambda" |> extra will return Some "flambda".

val with_variant : t -> string option -> t

with_variant t extra will return a fresh value with the extra version information in t to extra, and remove it if None is supplied.

val without_variant : t -> t

without_variant t is with_variant t None. It removes any extra version information from the version string t.

val with_patch : t -> int option -> t

with_patch t patch will return a fresh value with the patch number in t to patch, and remove it if None is supplied.

val without_patch : t -> t

without_patch t is as with_patch t None. It removes the least significant number from the version string. This is useful for the Docker OCaml containers, which are all named without a patch number and compiled using the latest patch release (e.g. 4.06 instead of 4.06.1).

val with_just_major_and_minor : t -> t

with_just_major_and_minor t strips out any patch and extra version information to return the X.Y form of the OCaml release. For example, 4.08.0+trunk+flambda will return the version representing 4.08.

Constants

val sys_version : t

sys_version is the version of OCaml that this library is currently compiled with, which will be the same as Sys.ocaml_version.

module Releases : sig ... end

Values representing official releases of OCaml.

module Sources : sig ... end

Values relating to the source code and version control of OCaml

Feature Selection

module Since : sig ... end

Determine which release a feature or architecture first appeared in.

module Has : sig ... end

Test whether a release has a given feature.

module Configure_options : sig ... end

Configuration parameters that affect the behaviour of OCaml at compiler-build-time.

val compiler_variants : arch -> t -> t list

compiler_variants v returns a list of configuration options that are available and useful for version v of the compiler.

val trunk_variants : arch -> t list

trunk_variants v returns a list of OCaml version configurations that should be working and tested on the trunk version of the compiler.

module Opam : sig ... end

Opam compiler switches. These are available from the public opam-repository.

\ No newline at end of file +Ocaml_version (ocaml-version.Ocaml_version)

Module Ocaml_version

Manipulate, parse and generate OCaml version strings.

These are of the form major.minor.patch+extra, where the patch and extra fields are optional.

type t

Type of an OCaml version string

val v : ?patch:int -> ?prerelease:string -> ?extra:string -> int -> int -> t

v ?patch ?prerelease ?extra major minor will construct an OCaml version string with the appropriate parameters. The patch, prerelease, and extra indicators are optional, but it is conventional to include a patch value of 0 for most recent OCaml releases.

Parsers and serializers

val to_string : ?prerelease_sep:char -> ?sep:char -> t -> string

to_string ?sep t will convert the version t into a human-readable representation. The sep will default to the normal representation of extra version strings:

  • ~ for prerelease version
  • + otherwise This can be changed to another character by supplying sep and potentially prerelease_sep. If sep is defined but not prerelease_sep, the prerelease separator is represented by two sep characters. One such use case is to generate Docker container tags from OCaml version strings, where only dashes and alphanumeric characters are allowed.
val of_string : string -> (t, [> `Msg of string ]) Stdlib.result

of_string t will parse the version string in t. The return value is compatible with the Result combinators defined in the rresult library.

val of_string_exn : string -> t

of_string_exn t behaves as of_string but raises Invalid_argument if the string cannot be parsed.

val equal : t -> t -> bool

equal a b is the equality function for two OCaml version strings. Returns true if they are equal, false if they are not.

val compare : t -> t -> int

compare a b is the comparison function for two OCaml version strings. Returns -1 if a<b, 0 if they are equal and 1 if a>b. Comparison is done using integer comparison for the major, minor and patch versions, and lexical comparison for any extra version strings present.

val pp : Stdlib.Format.formatter -> t -> unit

pp fmt t will output a human-readable version string of t to the fmt formatter.

Architecture Support

These definitions cover the CPU architectures that OCaml runs and is supported on.

type arch = [
  1. | `I386
  2. | `X86_64
  3. | `Aarch64
  4. | `Aarch32
  5. | `Ppc64le
  6. | `S390x
  7. | `Riscv64
]

Type of CPU architectures. This is currently an incomplete list, and lists just those used by the opam test systems. Contributions welcome to complete it.

val arches : arch list

arches is an enumeration of all of the possible arch values.

val string_of_arch : arch -> string

string_of_arch arch will convert arch into a human-readable CPU architecture string. The result will follow the GOARCH convention used by Golang.

val arch_of_string : string -> (arch, [> `Msg of string ]) Stdlib.result

arch_of_string t will parse the architecture string in t. The return value is compatible with the Result combinators defined in the rresult library. This function is liberal and will attempt to understand variants of the same architecture. For example, both aarch64 and arm64 are parsed into Aarch64.

val arch_of_string_exn : string -> arch

arch_of_string_exn t is the same as arch_of_string, except that it raises Invalid_argument in case of error.

val arch_is_32bit : arch -> bool

arch_is_32bit t will return true if the architecture has a 32-bit wordsize.

val to_opam_arch : arch -> string

to_opam_arch arch will return a string that is compatible with opam's %{arch}% variable.

val of_opam_arch : string -> arch option

of_opam_arch s will try to convert s that represents an opam %{arch}% variable to an arch value.

val to_docker_arch : arch -> string

to_docker_arch arch will return a string that is compatible with a Docker multiarch property. This can be used in --platform flags to docker run, for example.

val of_docker_arch : string -> arch option

of_docker_arch s will try to convert s that represents a Docker multiarch variable to an arch value.

Accessors

val major : t -> int

major t will return the major version number of an OCaml release. For example, of_string "4.03.0" |> major will return 4.

val minor : t -> int

minor t will return the minor version number of an OCaml release. For example, of_string "4.03.0" |> minor will return 3.

val patch : t -> int option

patch t will return the patch version number of an OCaml release. For example, of_string "4.03.0" |> minor will return Some 0.

val prerelease : t -> string option

prerelease t will return the prerelease extra string of an OCaml prerelease. For example, of_string "4.12.0~beta+flambda" |> prerelease will return Some "beta".

val extra : t -> string option

extra t will return the additional information string of an OCaml release. For example, of_string "4.03.0+flambda" |> extra will return Some "flambda".

val with_variant : t -> string option -> t

with_variant t extra will return a fresh value with the extra version information in t to extra, and remove it if None is supplied.

val without_variant : t -> t

without_variant t is with_variant t None. It removes any extra version information from the version string t.

val with_patch : t -> int option -> t

with_patch t patch will return a fresh value with the patch number in t to patch, and remove it if None is supplied.

val without_patch : t -> t

without_patch t is as with_patch t None. It removes the least significant number from the version string. This is useful for the Docker OCaml containers, which are all named without a patch number and compiled using the latest patch release (e.g. 4.06 instead of 4.06.1).

val with_just_major_and_minor : t -> t

with_just_major_and_minor t strips out any patch and extra version information to return the X.Y form of the OCaml release. For example, 4.08.0+trunk+flambda will return the version representing 4.08.

Constants

val sys_version : t

sys_version is the version of OCaml that this library is currently compiled with, which will be the same as Sys.ocaml_version.

module Releases : sig ... end

Values representing official releases of OCaml.

module Sources : sig ... end

Values relating to the source code and version control of OCaml

Feature Selection

module Since : sig ... end

Determine which release a feature or architecture first appeared in.

module Has : sig ... end

Test whether a release has a given feature.

module Configure_options : sig ... end

Configuration parameters that affect the behaviour of OCaml at compiler-build-time.

val compiler_variants : arch -> t -> t list

compiler_variants v returns a list of configuration options that are available and useful for version v of the compiler.

val trunk_variants : arch -> t list

trunk_variants v returns a list of OCaml version configurations that should be working and tested on the trunk version of the compiler.

module Opam : sig ... end

Opam compiler switches. These are available from the public opam-repository.

diff --git a/doc/ocaml-version/index.html b/doc/ocaml-version/index.html index c32ad17..af0624f 100644 --- a/doc/ocaml-version/index.html +++ b/doc/ocaml-version/index.html @@ -1,2 +1,2 @@ -index (ocaml-version.index)

ocaml-version index

Library ocaml-version

The entry point of this library is the module: Ocaml_version.

\ No newline at end of file +index (ocaml-version.index)

ocaml-version index

Library ocaml-version

The entry point of this library is the module: Ocaml_version.

diff --git a/doc/fonts/KaTeX_AMS-Regular.woff2 b/doc/odoc.support/fonts/KaTeX_AMS-Regular.woff2 similarity index 100% rename from doc/fonts/KaTeX_AMS-Regular.woff2 rename to doc/odoc.support/fonts/KaTeX_AMS-Regular.woff2 diff --git a/doc/fonts/KaTeX_Caligraphic-Bold.woff2 b/doc/odoc.support/fonts/KaTeX_Caligraphic-Bold.woff2 similarity index 100% rename from doc/fonts/KaTeX_Caligraphic-Bold.woff2 rename to doc/odoc.support/fonts/KaTeX_Caligraphic-Bold.woff2 diff --git a/doc/fonts/KaTeX_Caligraphic-Regular.woff2 b/doc/odoc.support/fonts/KaTeX_Caligraphic-Regular.woff2 similarity index 100% rename from doc/fonts/KaTeX_Caligraphic-Regular.woff2 rename to doc/odoc.support/fonts/KaTeX_Caligraphic-Regular.woff2 diff --git a/doc/fonts/KaTeX_Fraktur-Bold.woff2 b/doc/odoc.support/fonts/KaTeX_Fraktur-Bold.woff2 similarity index 100% rename from doc/fonts/KaTeX_Fraktur-Bold.woff2 rename to doc/odoc.support/fonts/KaTeX_Fraktur-Bold.woff2 diff --git a/doc/fonts/KaTeX_Fraktur-Regular.woff2 b/doc/odoc.support/fonts/KaTeX_Fraktur-Regular.woff2 similarity index 100% rename from doc/fonts/KaTeX_Fraktur-Regular.woff2 rename to doc/odoc.support/fonts/KaTeX_Fraktur-Regular.woff2 diff --git a/doc/fonts/KaTeX_Main-Bold.woff2 b/doc/odoc.support/fonts/KaTeX_Main-Bold.woff2 similarity index 100% rename from doc/fonts/KaTeX_Main-Bold.woff2 rename to doc/odoc.support/fonts/KaTeX_Main-Bold.woff2 diff --git a/doc/fonts/KaTeX_Main-BoldItalic.woff2 b/doc/odoc.support/fonts/KaTeX_Main-BoldItalic.woff2 similarity index 100% rename from doc/fonts/KaTeX_Main-BoldItalic.woff2 rename to doc/odoc.support/fonts/KaTeX_Main-BoldItalic.woff2 diff --git a/doc/fonts/KaTeX_Main-Italic.woff2 b/doc/odoc.support/fonts/KaTeX_Main-Italic.woff2 similarity index 100% rename from doc/fonts/KaTeX_Main-Italic.woff2 rename to doc/odoc.support/fonts/KaTeX_Main-Italic.woff2 diff --git a/doc/fonts/KaTeX_Main-Regular.woff2 b/doc/odoc.support/fonts/KaTeX_Main-Regular.woff2 similarity index 100% rename from doc/fonts/KaTeX_Main-Regular.woff2 rename to doc/odoc.support/fonts/KaTeX_Main-Regular.woff2 diff --git a/doc/fonts/KaTeX_Math-BoldItalic.woff2 b/doc/odoc.support/fonts/KaTeX_Math-BoldItalic.woff2 similarity index 100% rename from doc/fonts/KaTeX_Math-BoldItalic.woff2 rename to doc/odoc.support/fonts/KaTeX_Math-BoldItalic.woff2 diff --git a/doc/fonts/KaTeX_Math-Italic.woff2 b/doc/odoc.support/fonts/KaTeX_Math-Italic.woff2 similarity index 100% rename from doc/fonts/KaTeX_Math-Italic.woff2 rename to doc/odoc.support/fonts/KaTeX_Math-Italic.woff2 diff --git a/doc/fonts/KaTeX_SansSerif-Bold.woff2 b/doc/odoc.support/fonts/KaTeX_SansSerif-Bold.woff2 similarity index 100% rename from doc/fonts/KaTeX_SansSerif-Bold.woff2 rename to doc/odoc.support/fonts/KaTeX_SansSerif-Bold.woff2 diff --git a/doc/fonts/KaTeX_SansSerif-Italic.woff2 b/doc/odoc.support/fonts/KaTeX_SansSerif-Italic.woff2 similarity index 100% rename from doc/fonts/KaTeX_SansSerif-Italic.woff2 rename to doc/odoc.support/fonts/KaTeX_SansSerif-Italic.woff2 diff --git a/doc/fonts/KaTeX_SansSerif-Regular.woff2 b/doc/odoc.support/fonts/KaTeX_SansSerif-Regular.woff2 similarity index 100% rename from doc/fonts/KaTeX_SansSerif-Regular.woff2 rename to doc/odoc.support/fonts/KaTeX_SansSerif-Regular.woff2 diff --git a/doc/fonts/KaTeX_Script-Regular.woff2 b/doc/odoc.support/fonts/KaTeX_Script-Regular.woff2 similarity index 100% rename from doc/fonts/KaTeX_Script-Regular.woff2 rename to doc/odoc.support/fonts/KaTeX_Script-Regular.woff2 diff --git a/doc/fonts/KaTeX_Size1-Regular.woff2 b/doc/odoc.support/fonts/KaTeX_Size1-Regular.woff2 similarity index 100% rename from doc/fonts/KaTeX_Size1-Regular.woff2 rename to doc/odoc.support/fonts/KaTeX_Size1-Regular.woff2 diff --git a/doc/fonts/KaTeX_Size2-Regular.woff2 b/doc/odoc.support/fonts/KaTeX_Size2-Regular.woff2 similarity index 100% rename from doc/fonts/KaTeX_Size2-Regular.woff2 rename to doc/odoc.support/fonts/KaTeX_Size2-Regular.woff2 diff --git a/doc/fonts/KaTeX_Size3-Regular.woff2 b/doc/odoc.support/fonts/KaTeX_Size3-Regular.woff2 similarity index 100% rename from doc/fonts/KaTeX_Size3-Regular.woff2 rename to doc/odoc.support/fonts/KaTeX_Size3-Regular.woff2 diff --git a/doc/fonts/KaTeX_Size4-Regular.woff2 b/doc/odoc.support/fonts/KaTeX_Size4-Regular.woff2 similarity index 100% rename from doc/fonts/KaTeX_Size4-Regular.woff2 rename to doc/odoc.support/fonts/KaTeX_Size4-Regular.woff2 diff --git a/doc/fonts/KaTeX_Typewriter-Regular.woff2 b/doc/odoc.support/fonts/KaTeX_Typewriter-Regular.woff2 similarity index 100% rename from doc/fonts/KaTeX_Typewriter-Regular.woff2 rename to doc/odoc.support/fonts/KaTeX_Typewriter-Regular.woff2 diff --git a/doc/odoc.support/fonts/fira-mono-v14-latin-500.woff2 b/doc/odoc.support/fonts/fira-mono-v14-latin-500.woff2 new file mode 100644 index 0000000..9d07a63 Binary files /dev/null and b/doc/odoc.support/fonts/fira-mono-v14-latin-500.woff2 differ diff --git a/doc/odoc.support/fonts/fira-mono-v14-latin-regular.woff2 b/doc/odoc.support/fonts/fira-mono-v14-latin-regular.woff2 new file mode 100644 index 0000000..edc71a8 Binary files /dev/null and b/doc/odoc.support/fonts/fira-mono-v14-latin-regular.woff2 differ diff --git a/doc/odoc.support/fonts/fira-sans-v17-latin-500.woff2 b/doc/odoc.support/fonts/fira-sans-v17-latin-500.woff2 new file mode 100644 index 0000000..24bb8f4 Binary files /dev/null and b/doc/odoc.support/fonts/fira-sans-v17-latin-500.woff2 differ diff --git a/doc/odoc.support/fonts/fira-sans-v17-latin-500italic.woff2 b/doc/odoc.support/fonts/fira-sans-v17-latin-500italic.woff2 new file mode 100644 index 0000000..1a8b72d Binary files /dev/null and b/doc/odoc.support/fonts/fira-sans-v17-latin-500italic.woff2 differ diff --git a/doc/odoc.support/fonts/fira-sans-v17-latin-700.woff2 b/doc/odoc.support/fonts/fira-sans-v17-latin-700.woff2 new file mode 100644 index 0000000..40b8a1c Binary files /dev/null and b/doc/odoc.support/fonts/fira-sans-v17-latin-700.woff2 differ diff --git a/doc/odoc.support/fonts/fira-sans-v17-latin-700italic.woff2 b/doc/odoc.support/fonts/fira-sans-v17-latin-700italic.woff2 new file mode 100644 index 0000000..bdf8f5f Binary files /dev/null and b/doc/odoc.support/fonts/fira-sans-v17-latin-700italic.woff2 differ diff --git a/doc/odoc.support/fonts/fira-sans-v17-latin-italic.woff2 b/doc/odoc.support/fonts/fira-sans-v17-latin-italic.woff2 new file mode 100644 index 0000000..b9619dd Binary files /dev/null and b/doc/odoc.support/fonts/fira-sans-v17-latin-italic.woff2 differ diff --git a/doc/odoc.support/fonts/fira-sans-v17-latin-regular.woff2 b/doc/odoc.support/fonts/fira-sans-v17-latin-regular.woff2 new file mode 100644 index 0000000..d31eba8 Binary files /dev/null and b/doc/odoc.support/fonts/fira-sans-v17-latin-regular.woff2 differ diff --git a/doc/odoc.support/fonts/noticia-text-v15-latin-700.woff2 b/doc/odoc.support/fonts/noticia-text-v15-latin-700.woff2 new file mode 100644 index 0000000..536fbe1 Binary files /dev/null and b/doc/odoc.support/fonts/noticia-text-v15-latin-700.woff2 differ diff --git a/doc/odoc.support/fonts/noticia-text-v15-latin-italic.woff2 b/doc/odoc.support/fonts/noticia-text-v15-latin-italic.woff2 new file mode 100644 index 0000000..9b83b07 Binary files /dev/null and b/doc/odoc.support/fonts/noticia-text-v15-latin-italic.woff2 differ diff --git a/doc/odoc.support/fonts/noticia-text-v15-latin-regular.woff2 b/doc/odoc.support/fonts/noticia-text-v15-latin-regular.woff2 new file mode 100644 index 0000000..efff29f Binary files /dev/null and b/doc/odoc.support/fonts/noticia-text-v15-latin-regular.woff2 differ diff --git a/doc/highlight.pack.js b/doc/odoc.support/highlight.pack.js similarity index 59% rename from doc/highlight.pack.js rename to doc/odoc.support/highlight.pack.js index a373159..7d1bcd0 100644 --- a/doc/highlight.pack.js +++ b/doc/odoc.support/highlight.pack.js @@ -302,7 +302,238 @@ e["after:highlightBlock"](Object.assign({block:t.el},t))})})(e),s.push(e)} },t.versionString="11.7.0",t.regex={concat:p,lookahead:d,either:f,optional:h, anyNumberOfTimes:u};for(const t in A)"object"==typeof A[t]&&e.exports(A[t]) ;return Object.assign(t,A),t})({});return te}() -;"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);/*! `xml` grammar compiled for Highlight.js 11.7.0 */ +;"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);/*! `reasonml` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{ +const n="~?[a-z$_][0-9a-zA-Z$_]*",a="`?[A-Z$_][0-9a-zA-Z$_]*",s="("+["||","++","**","+.","*","/","*.","/.","..."].map((e=>e.split("").map((e=>"\\"+e)).join(""))).join("|")+"|\\|>|&&|==|===)",i="\\s+"+s+"\\s+",r={ +keyword:"and as asr assert begin class constraint do done downto else end exception external for fun function functor if in include inherit initializer land lazy let lor lsl lsr lxor match method mod module mutable new nonrec object of open or private rec sig struct then to try type val virtual when while with", +built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 ref string unit ", +literal:"true false" +},l="\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",t={ +className:"number",relevance:0,variants:[{begin:l},{begin:"\\(-"+l+"\\)"}]},c={ +className:"operator",relevance:0,begin:s},o=[{className:"identifier", +relevance:0,begin:n},c,t],g=[e.QUOTE_STRING_MODE,c,{className:"module", +begin:"\\b"+a,returnBegin:!0,relevance:0,end:".",contains:[{ +className:"identifier",begin:a,relevance:0}]}],b=[{className:"module", +begin:"\\b"+a,returnBegin:!0,end:".",relevance:0,contains:[{ +className:"identifier",begin:a,relevance:0}]}],m={className:"function", +relevance:0,keywords:r,variants:[{begin:"\\s(\\(\\.?.*?\\)|"+n+")\\s*=>", +end:"\\s*=>",returnBegin:!0,relevance:0,contains:[{className:"params", +variants:[{begin:n},{ +begin:"~?[a-z$_][0-9a-zA-Z$_]*(\\s*:\\s*[a-z$_][0-9a-z$_]*(\\(\\s*('?[a-z$_][0-9a-z$_]*\\s*(,'?[a-z$_][0-9a-z$_]*\\s*)*)?\\))?){0,2}" +},{begin:/\(\s*\)/}]}]},{begin:"\\s\\(\\.?[^;\\|]*\\)\\s*=>",end:"\\s=>", +returnBegin:!0,relevance:0,contains:[{className:"params",relevance:0,variants:[{ +begin:n,end:"(,|\\n|\\))",relevance:0,contains:[c,{className:"typing",begin:":", +end:"(,|\\n)",returnBegin:!0,relevance:0,contains:b}]}]}]},{ +begin:"\\(\\.\\s"+n+"\\)\\s*=>"}]};g.push(m);const d={className:"constructor", +begin:a+"\\(",end:"\\)",illegal:"\\n",keywords:r, +contains:[e.QUOTE_STRING_MODE,c,{className:"params",begin:"\\b"+n}]},u={ +className:"pattern-match",begin:"\\|",returnBegin:!0,keywords:r,end:"=>", +relevance:0,contains:[d,c,{relevance:0,className:"constructor",begin:a}]},v={ +className:"module-access",keywords:r,returnBegin:!0,variants:[{ +begin:"\\b("+a+"\\.)+"+n},{begin:"\\b("+a+"\\.)+\\(",end:"\\)",returnBegin:!0, +contains:[m,{begin:"\\(",end:"\\)",relevance:0,skip:!0}].concat(g)},{ +begin:"\\b("+a+"\\.)+\\{",end:/\}/}],contains:g};return b.push(v),{ +name:"ReasonML",aliases:["re"],keywords:r,illegal:"(:-|:=|\\$\\{|\\+=)", +contains:[e.COMMENT("/\\*","\\*/",{illegal:"^(#,\\/\\/)"}),{ +className:"character",begin:"'(\\\\[^']+|[^'])'",illegal:"\\n",relevance:0 +},e.QUOTE_STRING_MODE,{className:"literal",begin:"\\(\\)",relevance:0},{ +className:"literal",begin:"\\[\\|",end:"\\|\\]",relevance:0,contains:o},{ +className:"literal",begin:"\\[",end:"\\]",relevance:0,contains:o},d,{ +className:"operator",begin:i,illegal:"--\x3e",relevance:0 +},t,e.C_LINE_COMMENT_MODE,u,m,{className:"module-def", +begin:"\\bmodule\\s+"+n+"\\s+"+a+"\\s+=\\s+\\{",end:/\}/,returnBegin:!0, +keywords:r,relevance:0,contains:[{className:"module",relevance:0,begin:a},{ +begin:/\{/,end:/\}/,relevance:0,skip:!0}].concat(g)},v]}}})() +;hljs.registerLanguage("reasonml",e)})();/*! `javascript` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict" +;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],t=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],s=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],r=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c=["arguments","this","super","console","window","document","localStorage","module","global"],i=[].concat(r,t,s) +;return o=>{const l=o.regex,b=e,d={begin:/<[A-Za-z0-9\\._:-]+/, +end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,n)=>{ +const a=e[0].length+e.index,t=e.input[a] +;if("<"===t||","===t)return void n.ignoreMatch();let s +;">"===t&&(((e,{after:n})=>{const a="",M={ +match:[/const|var|let/,/\s+/,b,/\s*/,/=\s*/,/(async\s*)?/,l.lookahead(C)], +keywords:"async",className:{1:"keyword",3:"title.function"},contains:[S]} +;return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:g,exports:{ +PARAMS_CONTAINS:p,CLASS_REFERENCE:R},illegal:/#(?![$_A-z])/, +contains:[o.SHEBANG({label:"shebang",binary:"node",relevance:5}),{ +label:"use_strict",className:"meta",relevance:10, +begin:/^\s*['"]use (strict|asm)['"]/ +},o.APOS_STRING_MODE,o.QUOTE_STRING_MODE,y,N,_,h,{match:/\$\d+/},E,R,{ +className:"attr",begin:b+l.lookahead(":"),relevance:0},M,{ +begin:"("+o.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*", +keywords:"return throw case",relevance:0,contains:[h,o.REGEXP_MODE,{ +className:"function",begin:C,returnBegin:!0,end:"\\s*=>",contains:[{ +className:"params",variants:[{begin:o.UNDERSCORE_IDENT_RE,relevance:0},{ +className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0, +excludeEnd:!0,keywords:g,contains:p}]}]},{begin:/,/,relevance:0},{match:/\s+/, +relevance:0},{variants:[{begin:"<>",end:""},{ +match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:d.begin, +"on:begin":d.isTrulyOpeningTag,end:d.end}],subLanguage:"xml",contains:[{ +begin:d.begin,end:d.end,skip:!0,contains:["self"]}]}]},O,{ +beginKeywords:"while if switch catch for"},{ +begin:"\\b(?!function)"+o.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", +returnBegin:!0,label:"func.def",contains:[S,o.inherit(o.TITLE_MODE,{begin:b, +className:"title.function"})]},{match:/\.\.\./,relevance:0},x,{match:"\\$"+b, +relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"}, +contains:[S]},k,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/, +className:"variable.constant"},w,T,{match:/\$[(.]/}]}}})() +;hljs.registerLanguage("javascript",e)})();/*! `sql` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{ +const r=e.regex,t=e.COMMENT("--","$"),n=["true","false","unknown"],a=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],i=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],s=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],o=i,c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!i.includes(e))),l={ +begin:r.concat(/\b/,r.either(...o),/\s*\(/),relevance:0,keywords:{built_in:o}} +;return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{ +$pattern:/\b[\w\.]+/,keyword:((e,{exceptions:r,when:t}={})=>{const n=t +;return r=r||[],e.map((e=>e.match(/\|\d+$/)||r.includes(e)?e:n(e)?e+"|0":e)) +})(c,{when:e=>e.length<3}),literal:n,type:a, +built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"] +},contains:[{begin:r.either(...s),relevance:0,keywords:{$pattern:/[\w\.]+/, +keyword:c.concat(s),literal:n,type:a}},{className:"type", +begin:r.either("double precision","large object","with timezone","without timezone") +},l,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{ +begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{ +begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t,{className:"operator", +begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}}})() +;hljs.registerLanguage("sql",e)})();/*! `bash` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{const s=e.regex,t={},n={begin:/\$\{/, +end:/\}/,contains:["self",{begin:/:-/,contains:[t]}]};Object.assign(t,{ +className:"variable",variants:[{ +begin:s.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},n]});const a={ +className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i={ +begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/, +end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/, +contains:[e.BACKSLASH_ESCAPE,t,a]};a.contains.push(c);const o={begin:/\$?\(\(/, +end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,t] +},r=e.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10 +}),l={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0, +contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{ +name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/, +keyword:["if","then","else","elif","fi","for","while","in","do","done","case","esac","function"], +literal:["true","false"], +built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"] +},contains:[r,e.SHEBANG(),l,o,e.HASH_COMMENT_MODE,i,{match:/(\/[a-z._-]+)+/},c,{ +className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},t]}}})() +;hljs.registerLanguage("bash",e)})();/*! `shell` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var s=(()=>{"use strict";return s=>({name:"Shell Session", +aliases:["console","shellsession"],contains:[{className:"meta.prompt", +begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/, +subLanguage:"bash"}}]})})();hljs.registerLanguage("shell",s)})();/*! `plaintext` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var t=(()=>{"use strict";return t=>({name:"Plain text", +aliases:["text","txt"],disableAutodetect:!0})})() +;hljs.registerLanguage("plaintext",t)})();/*! `graphql` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{const a=e.regex;return{name:"GraphQL", +aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{ +keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"], +literal:["true","false","null"]}, +contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{ +scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation", +begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/, +end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{ +scope:"symbol",begin:a.concat(/[_A-Za-z][_0-9A-Za-z]*/,a.lookahead(/\s*:/)), +relevance:0}],illegal:[/[;<']/,/BEGIN/]}}})();hljs.registerLanguage("graphql",e) +})();/*! `ocaml` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>({name:"OCaml",aliases:["ml"], +keywords:{$pattern:"[a-z_]\\w*!?", +keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value", +built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref", +literal:"true false"},illegal:/\/\/|>>/,contains:[{className:"literal", +begin:"\\[(\\|\\|)?\\]|\\(\\)",relevance:0},e.COMMENT("\\(\\*","\\*\\)",{ +contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{ +className:"type",begin:"`[A-Z][\\w']*"},{className:"type", +begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*",relevance:0 +},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0 +}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number", +begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)", +relevance:0},{begin:/->/}]})})();hljs.registerLanguage("ocaml",e)})();/*! `json` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{const a=["true","false","null"],n={ +scope:"literal",beginKeywords:a.join(" ")};return{name:"JSON",keywords:{ +literal:a},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/, +relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0 +},e.QUOTE_STRING_MODE,n,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE], +illegal:"\\S"}}})();hljs.registerLanguage("json",e)})();/*! `python` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{ +const n=e.regex,a=/[\p{XID_Start}_]\p{XID_Continue}*/u,i=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],s={ +$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i, +built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"], +literal:["__debug__","Ellipsis","False","None","NotImplemented","True"], +type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"] +},t={className:"meta",begin:/^(>>>|\.\.\.) /},r={className:"subst",begin:/\{/, +end:/\}/,keywords:s,illegal:/#/},l={begin:/\{\{/,relevance:0},b={ +className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{ +begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/, +contains:[e.BACKSLASH_ESCAPE,t],relevance:10},{ +begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/, +contains:[e.BACKSLASH_ESCAPE,t],relevance:10},{ +begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/, +contains:[e.BACKSLASH_ESCAPE,t,l,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/, +end:/"""/,contains:[e.BACKSLASH_ESCAPE,t,l,r]},{begin:/([uU]|[rR])'/,end:/'/, +relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{ +begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/, +end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/, +contains:[e.BACKSLASH_ESCAPE,l,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/, +contains:[e.BACKSLASH_ESCAPE,l,r]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE] +},o="[0-9](_?[0-9])*",c=`(\\b(${o}))?\\.(${o})|\\b(${o})\\.`,d="\\b|"+i.join("|"),g={ +className:"number",relevance:0,variants:[{ +begin:`(\\b(${o})|(${c}))[eE][+-]?(${o})[jJ]?(?=${d})`},{begin:`(${c})[jJ]?`},{ +begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{ +begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})` +},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${o})[jJ](?=${d})` +}]},p={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:s, +contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={ +className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/, +end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s, +contains:["self",t,g,b,e.HASH_COMMENT_MODE]}]};return r.contains=[b,g,t],{ +name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:s, +illegal:/(<\/|->|\?)|=>/,contains:[t,g,{begin:/\bself\b/},{beginKeywords:"if", +relevance:0},b,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,a],scope:{ +1:"keyword",3:"title.function"},contains:[m]},{variants:[{ +match:[/\bclass/,/\s+/,a,/\s*/,/\(\s*/,a,/\s*\)/]},{match:[/\bclass/,/\s+/,a]}], +scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{ +className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[g,m,b]}]}}})() +;hljs.registerLanguage("python",e)})();/*! `xml` grammar compiled for Highlight.js 11.7.0 */ (()=>{var e=(()=>{"use strict";return e=>{ const a=e.regex,n=a.concat(/[\p{L}_]/u,a.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s={ className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},t={begin:/\s/, @@ -360,102 +591,44 @@ contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{ begin:"^[-\\*]{3,}",end:"$"},a,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{ className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{ className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}})() -;hljs.registerLanguage("markdown",e)})();/*! `plaintext` grammar compiled for Highlight.js 11.7.0 */ -(()=>{var t=(()=>{"use strict";return t=>({name:"Plain text", -aliases:["text","txt"],disableAutodetect:!0})})() -;hljs.registerLanguage("plaintext",t)})();/*! `ocaml` grammar compiled for Highlight.js 11.7.0 */ -(()=>{var e=(()=>{"use strict";return e=>({name:"OCaml",aliases:["ml"], -keywords:{$pattern:"[a-z_]\\w*!?", -keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value", -built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref", -literal:"true false"},illegal:/\/\/|>>/,contains:[{className:"literal", -begin:"\\[(\\|\\|)?\\]|\\(\\)",relevance:0},e.COMMENT("\\(\\*","\\*\\)",{ -contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{ -className:"type",begin:"`[A-Z][\\w']*"},{className:"type", -begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*",relevance:0 -},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0 -}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number", -begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)", -relevance:0},{begin:/->/}]})})();hljs.registerLanguage("ocaml",e)})();/*! `python` grammar compiled for Highlight.js 11.7.0 */ -(()=>{var e=(()=>{"use strict";return e=>{ -const n=e.regex,a=/[\p{XID_Start}_]\p{XID_Continue}*/u,i=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],s={ -$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i, -built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"], -literal:["__debug__","Ellipsis","False","None","NotImplemented","True"], -type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"] -},t={className:"meta",begin:/^(>>>|\.\.\.) /},r={className:"subst",begin:/\{/, -end:/\}/,keywords:s,illegal:/#/},l={begin:/\{\{/,relevance:0},b={ -className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{ -begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/, -contains:[e.BACKSLASH_ESCAPE,t],relevance:10},{ -begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/, -contains:[e.BACKSLASH_ESCAPE,t],relevance:10},{ -begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/, -contains:[e.BACKSLASH_ESCAPE,t,l,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/, -end:/"""/,contains:[e.BACKSLASH_ESCAPE,t,l,r]},{begin:/([uU]|[rR])'/,end:/'/, -relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{ -begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/, -end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/, -contains:[e.BACKSLASH_ESCAPE,l,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/, -contains:[e.BACKSLASH_ESCAPE,l,r]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE] -},o="[0-9](_?[0-9])*",c=`(\\b(${o}))?\\.(${o})|\\b(${o})\\.`,d="\\b|"+i.join("|"),g={ -className:"number",relevance:0,variants:[{ -begin:`(\\b(${o})|(${c}))[eE][+-]?(${o})[jJ]?(?=${d})`},{begin:`(${c})[jJ]?`},{ -begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{ -begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})` -},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${o})[jJ](?=${d})` -}]},p={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:s, -contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={ -className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/, -end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s, -contains:["self",t,g,b,e.HASH_COMMENT_MODE]}]};return r.contains=[b,g,t],{ -name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:s, -illegal:/(<\/|->|\?)|=>/,contains:[t,g,{begin:/\bself\b/},{beginKeywords:"if", -relevance:0},b,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,a],scope:{ -1:"keyword",3:"title.function"},contains:[m]},{variants:[{ -match:[/\bclass/,/\s+/,a,/\s*/,/\(\s*/,a,/\s*\)/]},{match:[/\bclass/,/\s+/,a]}], -scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{ -className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[g,m,b]}]}}})() -;hljs.registerLanguage("python",e)})();/*! `reasonml` grammar compiled for Highlight.js 11.7.0 */ -(()=>{var e=(()=>{"use strict";return e=>{ -const n="~?[a-z$_][0-9a-zA-Z$_]*",a="`?[A-Z$_][0-9a-zA-Z$_]*",s="("+["||","++","**","+.","*","/","*.","/.","..."].map((e=>e.split("").map((e=>"\\"+e)).join(""))).join("|")+"|\\|>|&&|==|===)",i="\\s+"+s+"\\s+",r={ -keyword:"and as asr assert begin class constraint do done downto else end exception external for fun function functor if in include inherit initializer land lazy let lor lsl lsr lxor match method mod module mutable new nonrec object of open or private rec sig struct then to try type val virtual when while with", -built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 ref string unit ", -literal:"true false" -},l="\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",t={ -className:"number",relevance:0,variants:[{begin:l},{begin:"\\(-"+l+"\\)"}]},c={ -className:"operator",relevance:0,begin:s},o=[{className:"identifier", -relevance:0,begin:n},c,t],g=[e.QUOTE_STRING_MODE,c,{className:"module", -begin:"\\b"+a,returnBegin:!0,relevance:0,end:".",contains:[{ -className:"identifier",begin:a,relevance:0}]}],b=[{className:"module", -begin:"\\b"+a,returnBegin:!0,end:".",relevance:0,contains:[{ -className:"identifier",begin:a,relevance:0}]}],m={className:"function", -relevance:0,keywords:r,variants:[{begin:"\\s(\\(\\.?.*?\\)|"+n+")\\s*=>", -end:"\\s*=>",returnBegin:!0,relevance:0,contains:[{className:"params", -variants:[{begin:n},{ -begin:"~?[a-z$_][0-9a-zA-Z$_]*(\\s*:\\s*[a-z$_][0-9a-z$_]*(\\(\\s*('?[a-z$_][0-9a-z$_]*\\s*(,'?[a-z$_][0-9a-z$_]*\\s*)*)?\\))?){0,2}" -},{begin:/\(\s*\)/}]}]},{begin:"\\s\\(\\.?[^;\\|]*\\)\\s*=>",end:"\\s=>", -returnBegin:!0,relevance:0,contains:[{className:"params",relevance:0,variants:[{ -begin:n,end:"(,|\\n|\\))",relevance:0,contains:[c,{className:"typing",begin:":", -end:"(,|\\n)",returnBegin:!0,relevance:0,contains:b}]}]}]},{ -begin:"\\(\\.\\s"+n+"\\)\\s*=>"}]};g.push(m);const d={className:"constructor", -begin:a+"\\(",end:"\\)",illegal:"\\n",keywords:r, -contains:[e.QUOTE_STRING_MODE,c,{className:"params",begin:"\\b"+n}]},u={ -className:"pattern-match",begin:"\\|",returnBegin:!0,keywords:r,end:"=>", -relevance:0,contains:[d,c,{relevance:0,className:"constructor",begin:a}]},v={ -className:"module-access",keywords:r,returnBegin:!0,variants:[{ -begin:"\\b("+a+"\\.)+"+n},{begin:"\\b("+a+"\\.)+\\(",end:"\\)",returnBegin:!0, -contains:[m,{begin:"\\(",end:"\\)",relevance:0,skip:!0}].concat(g)},{ -begin:"\\b("+a+"\\.)+\\{",end:/\}/}],contains:g};return b.push(v),{ -name:"ReasonML",aliases:["re"],keywords:r,illegal:"(:-|:=|\\$\\{|\\+=)", -contains:[e.COMMENT("/\\*","\\*/",{illegal:"^(#,\\/\\/)"}),{ -className:"character",begin:"'(\\\\[^']+|[^'])'",illegal:"\\n",relevance:0 -},e.QUOTE_STRING_MODE,{className:"literal",begin:"\\(\\)",relevance:0},{ -className:"literal",begin:"\\[\\|",end:"\\|\\]",relevance:0,contains:o},{ -className:"literal",begin:"\\[",end:"\\]",relevance:0,contains:o},d,{ -className:"operator",begin:i,illegal:"--\x3e",relevance:0 -},t,e.C_LINE_COMMENT_MODE,u,m,{className:"module-def", -begin:"\\bmodule\\s+"+n+"\\s+"+a+"\\s+=\\s+\\{",end:/\}/,returnBegin:!0, -keywords:r,relevance:0,contains:[{className:"module",relevance:0,begin:a},{ -begin:/\{/,end:/\}/,relevance:0,skip:!0}].concat(g)},v]}}})() -;hljs.registerLanguage("reasonml",e)})(); \ No newline at end of file +;hljs.registerLanguage("markdown",e)})();/*! `c` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{const n=e.regex,t=e.COMMENT("//","$",{ +contains:[{begin:/\\\n/}] +}),s="[a-zA-Z_]\\w*::",a="(decltype\\(auto\\)|"+n.optional(s)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",r={ +className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{ +match:/\batomic_[a-z]{3,6}\b/}]},i={className:"string",variants:[{ +begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{ +begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", +end:"'",illegal:"."},e.END_SAME_AS_BEGIN({ +begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={ +className:"number",variants:[{begin:"\\b(0b[01']+)"},{ +begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" +},{ +begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" +}],relevance:0},o={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{ +keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" +},contains:[{begin:/\\\n/,relevance:0},e.inherit(i,{className:"string"}),{ +className:"string",begin:/<.*?>/},t,e.C_BLOCK_COMMENT_MODE]},c={ +className:"title",begin:n.optional(s)+e.IDENT_RE,relevance:0 +},d=n.optional(s)+e.IDENT_RE+"\\s*\\(",u={ +keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"], +type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"], +literal:"true false NULL", +built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr" +},g=[o,r,t,e.C_BLOCK_COMMENT_MODE,l,i],m={variants:[{begin:/=/,end:/;/},{ +begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}], +keywords:u,contains:g.concat([{begin:/\(/,end:/\)/,keywords:u, +contains:g.concat(["self"]),relevance:0}]),relevance:0},p={ +begin:"("+a+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0, +keywords:u,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:"decltype\\(auto\\)", +keywords:u,relevance:0},{begin:d,returnBegin:!0,contains:[e.inherit(c,{ +className:"title.function"})],relevance:0},{relevance:0,match:/,/},{ +className:"params",begin:/\(/,end:/\)/,keywords:u,relevance:0, +contains:[t,e.C_BLOCK_COMMENT_MODE,i,l,r,{begin:/\(/,end:/\)/,keywords:u, +relevance:0,contains:["self",t,e.C_BLOCK_COMMENT_MODE,i,l,r]}] +},r,t,e.C_BLOCK_COMMENT_MODE,o]};return{name:"C",aliases:["h"],keywords:u, +disableAutodetect:!0,illegal:"=]/,contains:[{ +beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:o, +strings:i,keywords:u}}}})();hljs.registerLanguage("c",e)})(); diff --git a/doc/katex.min.css b/doc/odoc.support/katex.min.css similarity index 100% rename from doc/katex.min.css rename to doc/odoc.support/katex.min.css diff --git a/doc/katex.min.js b/doc/odoc.support/katex.min.js similarity index 100% rename from doc/katex.min.js rename to doc/odoc.support/katex.min.js diff --git a/doc/odoc.css b/doc/odoc.support/odoc.css similarity index 53% rename from doc/odoc.css rename to doc/odoc.support/odoc.css index 8b0ed5a..83ebcf0 100644 --- a/doc/odoc.css +++ b/doc/odoc.support/odoc.css @@ -1,19 +1,108 @@ @charset "UTF-8"; /* Copyright (c) 2016 The odoc contributors. All rights reserved. Distributed under the ISC license, see terms at the end of the file. - odoc 2.2.0 */ + odoc 2.4.0 */ /* Fonts */ -@import url('https://fonts.googleapis.com/css?family=Fira+Mono:400,500'); -@import url('https://fonts.googleapis.com/css?family=Noticia+Text:400,400i,700'); -@import url('https://fonts.googleapis.com/css?family=Fira+Sans:400,400i,500,500i,600,600i,700,700i'); +/* noticia-text-regular - latin */ +@font-face { + font-family: 'Noticia Text'; + font-style: normal; + font-weight: 400; + src: url('fonts/noticia-text-v15-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* noticia-text-italic - latin */ +@font-face { + font-family: 'Noticia Text'; + font-style: italic; + font-weight: 400; + src: url('fonts/noticia-text-v15-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* noticia-text-700 - latin */ +@font-face { + font-family: 'Noticia Text'; + font-style: normal; + font-weight: 700; + src: url('fonts/noticia-text-v15-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-mono-regular - latin */ +@font-face { + font-family: 'Fira Mono'; + font-style: normal; + font-weight: 400; + src: url('fonts/fira-mono-v14-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-mono-500 - latin */ +@font-face { + font-family: 'Fira Mono'; + font-style: normal; + font-weight: 500; + src: url('fonts/fira-mono-v14-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-sans-regular - latin */ +@font-face { + font-family: 'Fira Sans'; + font-style: normal; + font-weight: 400; + src: url('fonts/fira-sans-v17-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-sans-italic - latin */ +@font-face { + font-family: 'Fira Sans'; + font-style: italic; + font-weight: 400; + src: url('fonts/fira-sans-v17-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-sans-500 - latin */ +@font-face { + font-family: 'Fira Sans'; + font-style: normal; + font-weight: 500; + src: url('fonts/fira-sans-v17-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-sans-500italic - latin */ +@font-face { + font-family: 'Fira Sans'; + font-style: italic; + font-weight: 500; + src: url('fonts/fira-sans-v17-latin-500italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-sans-700 - latin */ +@font-face { + font-family: 'Fira Sans'; + font-style: normal; + font-weight: 700; + src: url('fonts/fira-sans-v17-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-sans-700italic - latin */ +@font-face { + font-family: 'Fira Sans'; + font-style: italic; + font-weight: 700; + src: url('fonts/fira-sans-v17-latin-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + :root, .light:root { - --main-background: #FFFFFF; + + scroll-padding-top: calc(var(--search-bar-height) + var(--search-padding-top) + 1em); + + --main-background: #FFFFFF; --color: #333333; --link-color: #2C94BD; + --source-color: grey; --anchor-hover: #555; --anchor-color: #d5d5d5; --xref-shadow: #cc6666; @@ -30,13 +119,21 @@ --toc-color: #1F2D3D; --toc-before-color: #777; --toc-background: #f6f8fa; + --toc-background-emph: #ecf0f5; --toc-list-border: #ccc; --spec-summary-border-color: #5c9cf5; + --spec-label-color: green; --spec-summary-background: var(--code-background); --spec-summary-hover-background: #ebeff2; --spec-details-after-background: rgba(0, 4, 15, 0.05); --spec-details-after-shadow: rgba(204, 204, 204, 0.53); + + --search-results-border: #bbb; + --search-results-shadow: #bbb; + + --search-snake: #82aaff; + } .dark:root { @@ -64,6 +161,7 @@ --li-code-color: #999; --toc-color: #777; --toc-background: #252525; + --toc-background-emph: #2a2a2a; --hljs-link: #999; --hljs-keyword: #cda869; @@ -72,6 +170,12 @@ --hljs-type: #ac885b; --hljs-meta: #82aaff; --hljs-variable: #cf6a4c; + + --spec-label-color: lightgreen; + + --search-results-border: #505050; + --search-results-shadow: #404040; + } @media (prefers-color-scheme: dark) { @@ -106,6 +210,7 @@ --toc-color: #777; --toc-before-color: #777; --toc-background: #252525; + --toc-background-emph: #2a2a2a; --toc-list-border: #ccc; --spec-summary-hover-background: #ebeff2; --spec-details-after-background: rgba(0, 4, 15, 0.05); @@ -118,6 +223,12 @@ --hljs-type: #ac885b; --hljs-meta: #82aaff; --hljs-variable: #cf6a4c; + + --spec-label-color: lightgreen; + + --search-results-border: #505050; + --search-results-shadow: #404040; + } } @@ -142,6 +253,7 @@ table { html { font-size: 15px; + scroll-behavior: smooth; } body { @@ -149,24 +261,55 @@ body { background: #FFFFFF; color: var(--color); background-color: var(--main-background); + font-family: "Noticia Text", Georgia, serif; + line-height: 1.5; } body { - max-width: 100ex; - margin-left: calc(10vw + 20ex); - margin-right: 4ex; - margin-top: 20px; - margin-bottom: 50px; - font-family: "Noticia Text", Georgia, serif; - line-height: 1.5; + margin-left: auto; + margin-right: auto; + padding: 0 4ex; +} + +body.odoc { + max-width: 132ex; + display: grid; + grid-template-columns: min-content 1fr; + column-gap: 4ex; + row-gap: 2ex; +} + +body.odoc-src { + margin-right: calc(10vw + 20ex); +} + +.odoc-content { + grid-row: 4; + grid-column: 2; +} + +.odoc-preamble > *:first-child { + /* This make the first thing in the preamble align with the sidebar */ + padding-top: 0; + margin-top: 0; } header { margin-bottom: 30px; } +header.odoc-preamble { + grid-column: 2; + grid-row: 3; +} + nav { - font-family: "Fira Sans", Helvetica, Arial, sans-serif; + font-family: "Fira Sans", sans-serif; +} + +nav.odoc-nav { + grid-column: 2; + grid-row: 2; } /* Basic markup elements */ @@ -238,6 +381,10 @@ a { color: var(--link-color); } +.odoc-src pre a { + color: inherit; +} + a:hover { box-shadow: 0 1px 0 0 var(--link-color); } @@ -289,18 +436,30 @@ a.anchor { box-shadow: 0 1px 0 0 var(--xref-shadow); } +/* Source links float inside preformated text or headings. */ +a.source_link { + float: right; + color: var(--source-color); + font-family: "Fira Sans", sans-serif; + font-size: initial; +} + /* Section and document divisions. Until at least 4.03 many of the modules of the stdlib start at .h7, we restart the sequence there like h2 */ h1, h2, h3, h4, h5, h6, .h7, .h8, .h9, .h10 { - font-family: "Fira Sans", Helvetica, Arial, sans-serif; + font-family: "Fira Sans", sans-serif; font-weight: 400; padding-top: 0.1em; line-height: 1.2; overflow-wrap: break-word; } +.odoc-preamble h1 { + margin-top: 10px; +} + h1 { font-weight: 500; font-size: 2.441em; @@ -348,7 +507,7 @@ h4 { font-size: 1.12em; } -/* Comment delimiters, hidden but accessible to screen readers and +/* Comment delimiters, hidden but accessible to screen readers and selected for copy/pasting */ /* Taken from bootstrap */ @@ -368,36 +527,36 @@ h4 { /* Preformatted and code */ tt, code, pre { - font-family: "Fira Mono", courier; + font-family: "Fira Mono", monospace; font-weight: 400; } -pre { +.odoc pre { padding: 0.1em; border: 1px solid var(--pre-border-color); border-radius: 5px; overflow-x: auto; } -p code, -li code { +.odoc p code, +.odoc li code { background-color: var(--li-code-background); color: var(--li-code-color); border-radius: 3px; padding: 0 0.3ex; } -p a > code { +p a > code, li a > code { color: var(--link-color); } -code { +.odoc code { white-space: pre-wrap; } /* Code blocks (e.g. Examples) */ -pre code { +.odoc pre code { font-size: 0.893rem; } @@ -419,6 +578,10 @@ pre code { padding: 0.35em 0.5em; } +.spec .label, .spec .optlabel { + color: var(--spec-label-color); +} + li:not(:last-child) > .def-doc { margin-bottom: 15px; } @@ -434,10 +597,10 @@ div.odoc-spec,.odoc-include { .spec.type .variant, .spec.type .record { margin-left: 2ch; +} + +.spec.type li.variant, .spec.type li.record { list-style: none; - display: flex; - flex-wrap: wrap; - row-gap: 4px; } .spec.type .record > code, .spec.type .variant > code { @@ -454,9 +617,8 @@ div.odoc-spec,.odoc-include { padding: 0.25em 0.5em; margin-left: 10%; border-radius: 3px; - flex-grow:1; background: var(--main-background); - box-shadow: 2px 2px 4px lightgrey; + box-shadow: 1px 1px 2px lightgrey; } div.def { @@ -536,6 +698,12 @@ td.def-doc *:first-child { .at-tags li { padding-left: 3ex; text-indent: -3ex; } .at-tags .at-tag { text-transform: capitalize } +/* Alert emoji */ + +.alert::before, .deprecated::before { + content: '⚠️ '; +} + /* Lists of modules */ .modules { list-style-type: none; margin-left: -3ex; } @@ -618,19 +786,32 @@ td.def-doc *:first-child { line-height: 1.2; } +/* When a search bar is present, we need the sticky sidebar to be a bit lower, + so `top` is higher */ + +.odoc-search + * + .odoc-toc { + --toc-top: calc(var(--search-bar-height) + var(--search-padding-top) + 20px); + max-height: calc(100vh - 2 * var(--toc-top)); + top: var(--toc-top) +} + .odoc-toc { - position: fixed; - top: 0px; - bottom: 0px; - left: 0px; - max-width: 30ex; - min-width: 26ex; - width: 20%; + --toc-top: 20px; + width: 28ex; background: var(--toc-background); overflow: auto; color: var(--toc-color); padding-left: 2ex; padding-right: 2ex; + grid-row-start: 3; + grid-row-end: 5; + grid-column: 1; + height: fit-content; + border: solid 1px var(--border); + border-radius: 5px; + position:sticky; + max-height: calc(100vh - 2 * var(--toc-top)); + top: var(--toc-top) } .odoc-toc ul li a { @@ -638,15 +819,287 @@ td.def-doc *:first-child { font-size: 0.95em; color: var(--color); font-weight: 400; - line-height: 1.6em; + line-height: 1.2em; display: block; } -.odoc-toc ul li a:hover { +.odoc-sidebar ul li a:hover { box-shadow: none; text-decoration: underline; } +:root { + --search-bar-height: 25px; + --search-padding-top: 1rem; +} + +.odoc-search { + position: sticky; + top: 0; + background: var(--main-background); + /* This amounts to fit-content when the search is not active, but when you + have the search results displayed, you do not want the height of the search + container to change. */ + height: calc(var(--search-bar-height) + var(--search-padding-top)); + width: 100%; + padding-top: var(--search-padding-top); + z-index: 1; + grid-row: 1; + grid-column-start: 1; + grid-column-end: 3; +} + + +.odoc-search .search-inner { + width: 100%; + position: relative; + left: 0; + display: grid; + /* The second column is for the search snake, which has 0 width */ + grid-template-columns: 1fr 0fr; + grid-row-gap: 1rem; + /* The second row is for the search results. It has a width, but only */ + grid-template-rows: min-content 0px; + background: transparent; +} + +.odoc-search .search-bar { + position: relative; + z-index: 2; + font-size: 1em; + transition: font-size 0.3s; + box-shadow: 0px 0px 0.2rem 0.3em var(--main-background); + height: var(--search-bar-height); +} + +.odoc-search:focus-within .search-bar { + font-size: 1.1em; +} + +.odoc-search:not(:focus-within) .search-result { + display: none; +} + +.odoc-search .search-result:empty { + display: none; +} + +.odoc-search .search-result { + grid-row: 2; + background: var(--toc-background); + position: absolute; + left: 0; + right: 0; + border: solid; + border-color: var(--search-results-border); + border-width: 1px; + border-radius: 6px; + box-shadow: 0 3px 10px 2px var(--search-results-shadow), 0 0 3px 4px var(--main-background), 0px -1rem 0px 0px var(--main-background); + /* Works better on smallish screens with this */ + max-height: calc(min(40rem, 50vh)); + overflow-y: auto; +} + +.search-bar { + /* inputs are of fixed size by default, even if you display:block them */ + width: 100%; +} + + +.odoc-search .search-no-result { + color: var(--color); + border-bottom: var(--search-results-border) solid 1px; + background-color: inherit; + outline: 0; + padding: 10px; + padding-right: 0.5rem; +} + +.search-bar-container { + display: flex; + align-items: stretch; + border-bottom: 1rem solid var(--main-background); +} + +.search-snake { + grid-row: 1; + grid-column: 2; + display: flex; + align-items: center; + width: 0; + z-index: 2; + position: relative; + left: 0; + margin-top: 4px; + margin-bottom: 4px; + /* Otherwise the search snake flickers for very fast searches. */ + transition: opacity 0.2s; + opacity: 0; +} + +.search-snake.search-busy { + opacity: 1; +} + +.search-snake:before { + content: " "; + display: block; + aspect-ratio: 1 / 1; + height: 100%; + margin-right: 4px; + border-radius: 50%; + border: 3px solid #aaa; + border-color: var(--search-snake) transparent var(--search-snake) transparent; + animation: search-snake 1.2s linear infinite; + position: absolute; + right: 0; +} + +@keyframes search-snake { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +} + +:root { + --kind-font-size-factor: 0.8; +} + +.odoc-search .search-entry { + color: var(--color); + display: grid; + /* Possible kinds are the following : + "doc" "type" "mod" "exn" "class" "meth" "cons" "sig" "cons" "field" "val" + and "ext". + As the longest is 5 characters (and the font monospace), we give 5 + character size to the column. However the font used for kind is a little + smaller, so we adjust by this factor. + */ + grid-template-columns: [kinds] calc(var(--kind-font-size-factor) * 5ch) [titles] 1fr; + column-gap: 0.5rem; + border-bottom: var(--search-results-border) solid 1px; + background-color: inherit; + outline: 0; + padding: 0.4rem 0.4rem 0.7rem 0.7rem; +} +.odoc-search .search-entry p { + margin: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.odoc-search .search-entry:focus-visible { + box-shadow: none; + background-color: var(--target-background); +} + +.odoc-search .search-entry:hover { + box-shadow: none; + background-color: var(--toc-background-emph); +} + +.odoc-search .search-entry .entry-kind { + grid-row: 1/2; + grid-column: 1/2; + line-height: 1.4rem; + font-size: calc(var(--kind-font-size-factor) * 1em); + font-weight: bold; + text-align: right; + position: relative; + bottom: 0; +} + +.odoc-search .search-entry pre { + border: none; + margin: 0; +} + +.odoc-search .search-entry pre code { + font-size: 1em; + background-color: var(--li-code-background); + color: var(--li-code-color); + border-radius: 3px; + padding: 0 0.3ex; +} + +.odoc-search .search-entry .entry-title { + width: 100%; + display: block; + grid-column: 2/2; + grid-row: 1/2; + align-self: end; + line-height: 1.4rem; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.odoc-search .entry-name { + font-weight: bold; +} + +.odoc-search .prefix-name { + font-weight: bold; +} + +.odoc-search .search-entry .prefix-name { + opacity: 0.7; +} + +.odoc-search .entry-rhs { + white-space: nowrap; +} + +.odoc-search .search-entry .entry-content { + flex-grow: 1; + flex-shrink: 1; + min-width: 0; +} + +.odoc-search .search-entry .entry-comment { + max-height: 1.5em; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-size: 0.95em; + grid-row: 2/2; + grid-column: 2/2; +} + +.odoc-search .search-entry .entry-comment ul { + white-space: nowrap; + display: inline; +} + +.odoc-search .search-entry .entry-comment li { + display: inline; + white-space: nowrap; +} + +.odoc-search .search-entry .entry-comment ul>li::before { + content: '•'; +} + +.odoc-search .search-entry .entry-comment div { + display: inline; + white-space: nowrap; +} + +.odoc-search .search-entry .entry-comment p { + display: inline; + white-space: nowrap; +} + +.odoc-search .search-entry .entry-comment code { + display: inline; + white-space: nowrap; +} + /* First level titles */ .odoc-toc>ul>li>a { @@ -655,6 +1108,7 @@ td.def-doc *:first-child { .odoc-toc li ul { margin: 0px; + padding-top: 0.25em; } .odoc-toc ul { @@ -662,8 +1116,9 @@ td.def-doc *:first-child { } .odoc-toc ul li { - margin: 0; + padding: 0.25em 0; } + .odoc-toc>ul>li { margin-bottom: 0.3em; } @@ -674,12 +1129,35 @@ td.def-doc *:first-child { padding-left: 12px; } +/* Tables */ + +.odoc-table { + margin: 1em; +} + +.odoc-table td, +.odoc-table th { + padding-left: 0.5em; + padding-right: 0.5em; + border: 1px solid black; +} + +.odoc-table th { + font-weight: bold; +} + /* Mobile adjustements. */ -@media only screen and (max-width: 95ex) { - body.odoc { +@media only screen and (max-width: 110ex) { + body { margin: 2em; + padding: 0; + } + + body.odoc { + display: block; } + .odoc-toc { position: static; width: auto; @@ -699,11 +1177,53 @@ td.def-doc *:first-child { color: black; background: white; } + body nav:first-child { visibility: hidden; } } +/* Source code. */ + +.source_container { + display: flex; +} + +.source_line_column { + padding-right: 0.5em; + text-align: right; + background: #eee8d5; +} + +.source_line { + padding: 0 1em; +} + +.source_code { + flex-grow: 1; + background: #fdf6e3; + padding: 0 0.3em; + color: #657b83; +} + +/* Source directories */ + +.odoc-directory::before { + content: "📁"; + margin: 0.3em; + font-size: 1.3em; +} + +.odoc-file::before { + content: "📄"; + margin: 0.3em; + font-size: 1.3em; +} + +.odoc-folder-list { + list-style: none; +} + /* Syntax highlighting (based on github-gist) */ .hljs { @@ -777,6 +1297,85 @@ td.def-doc *:first-child { text-decoration: underline; } +.VAL, +.TYPE, +.LET, +.REC, +.IN, +.OPEN, +.NONREC, +.MODULE, +.METHOD, +.LETOP, +.INHERIT, +.INCLUDE, +.FUNCTOR, +.EXTERNAL, +.CONSTRAINT, +.ASSERT, +.AND, +.END, +.CLASS, +.STRUCT, +.SIG { + color: #859900; + ; +} + +.WITH, +.WHILE, +.WHEN, +.VIRTUAL, +.TRY, +.TO, +.THEN, +.PRIVATE, +.OF, +.NEW, +.MUTABLE, +.MATCH, +.LAZY, +.IF, +.FUNCTION, +.FUN, +.FOR, +.EXCEPTION, +.ELSE, +.TO, +.DOWNTO, +.DO, +.DONE, +.BEGIN, +.AS { + color: #cb4b16; +} + +.TRUE, +.FALSE { + color: #b58900; +} + +.failwith, +.INT, +.SEMISEMI, +.LIDENT { + color: #2aa198; +} + +.STRING, +.CHAR, +.UIDENT { + color: #b58900; +} + +.DOCSTRING { + color: #268bd2; +} + +.COMMENT { + color: #93a1a1; +} + /*--------------------------------------------------------------------------- Copyright (c) 2016 The odoc contributors @@ -791,4 +1390,4 @@ td.def-doc *:first-child { WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ---------------------------------------------------------------------------*/ + ---------------------------------------------------------------------------*/ \ No newline at end of file diff --git a/doc/odoc.support/odoc_search.js b/doc/odoc.support/odoc_search.js new file mode 100644 index 0000000..0dc659d --- /dev/null +++ b/doc/odoc.support/odoc_search.js @@ -0,0 +1,66 @@ +/* The browsers interpretation of the CORS origin policy prevents to run + webworkers from javascript files fetched from the file:// protocol. This hack + is to workaround this restriction. */ +function createWebWorker() { + var searchs = search_urls.map((search_url) => { + let parts = document.location.href.split("/"); + parts[parts.length - 1] = search_url; + return '"' + parts.join("/") + '"'; + }); + blobContents = ["importScripts(" + searchs.join(",") + ");"]; + var blob = new Blob(blobContents, { type: "application/javascript" }); + var blobUrl = URL.createObjectURL(blob); + + var worker = new Worker(blobUrl); + URL.revokeObjectURL(blobUrl); + + return worker; +} + +var worker; +var waiting = 0; + +function wait() { + waiting = waiting + 1; + document.querySelector(".search-snake").classList.add("search-busy"); +} + +function stop_waiting() { + if (waiting > 0) waiting = waiting - 1; + else waiting = 0; + if (waiting == 0) { + document.querySelector(".search-snake").classList.remove("search-busy"); + } +} + +document.querySelector(".search-bar").addEventListener("focus", (ev) => { + if (typeof worker == "undefined") { + worker = createWebWorker(); + worker.onmessage = (e) => { + stop_waiting(); + let results = e.data; + let search_results = document.querySelector(".search-result"); + search_results.innerHTML = ""; + let f = (entry) => { + let search_result = document.createElement("a"); + search_result.classList.add("search-entry"); + search_result.href = base_url + entry.url; + search_result.innerHTML = entry.html; + search_results.appendChild(search_result); + }; + results.forEach(f); + let search_request = document.querySelector(".search-bar").value; + if (results.length == 0 && search_request != "") { + let no_result = document.createElement("div"); + no_result.classList.add("search-no-result"); + no_result.innerText = "No result..."; + search_results.appendChild(no_result); + } + }; + } +}); + +document.querySelector(".search-bar").addEventListener("input", (ev) => { + wait(); + worker.postMessage(ev.target.value); +});