Module Ocaml_parsing.Language_extensionSource
Language extensions provided by the Jane Street version of the OCaml compiler.
A setting for extensions that track multiple maturity levels
type 'a t = 'a Ocaml_utils.Language_extension_kernel.t = | Comprehensions : unit t| Mode : maturity t| Unique : maturity t| Overwriting : unit t| Include_functor : unit t| Polymorphic_parameters : unit t| Immutable_arrays : unit t| Module_strengthening : unit t| Layouts : maturity t| SIMD : maturity t| Small_numbers : maturity t| Instances : unit t| Let_mutable : unit t| Layout_poly : maturity t| Runtime_metaprogramming : unit t
The type of language extensions. An 'a t is an extension that can either be off or be set to have any value in 'a, so a unit t can be either on or off, while a maturity t can have different maturity settings.
Require that an extension is enabled for at least the provided level, or else throw an exception at the provided location saying otherwise.
The type of language extension universes. Each universe allows a set of extensions, and every successive universe includes the previous one.
Disable all extensions
Check if a language extension is "erasable", i.e. whether it can be harmlessly translated to attributes and compiled with the upstream compiler.
Print and parse language extensions; parsing is case-insensitive
Get the command line string enabling the given extension, if it's enabled; otherwise None
Enable and disable according to command-line strings; these raise an exception if the input string is invalid.
Enable and disable language extensions; these operations are idempotent
Check if a language extension is currently enabled (at any maturity level)
Check if a language extension is enabled at least at the given level
Tooling support: Temporarily enable and disable language extensions; these operations are idempotent. Calls to set, enable, disable inside the body of the function argument will also be rolled back when the function finishes, but this behavior may change; nest multiple with_* functions instead.
Check if the allowable extensions are restricted to only those that are "erasable". This is true when the universe is set to No_extensions or Upstream_compatible.
Set the extension universe and enable all allowed extensions.
Parse a command-line string and call set_universe_and_enable_all. Raises if the argument is invalid.