package ppxlib_jane

  1. Overview
  2. Docs

Language extensions provided by the Jane Street version of the OCaml compiler.

This is the signature of the Language_extension_kernel module that is directly imported into ppxlib_jane.

type maturity =
  1. | Stable
  2. | Beta
  3. | Alpha
type _ t =
  1. | Comprehensions : unit t
  2. | Mode : unit t
  3. | Unique : unit t
  4. | Include_functor : unit t
  5. | Polymorphic_parameters : unit t
  6. | Immutable_arrays : unit t
  7. | Module_strengthening : unit t
  8. | Layouts : maturity t
  9. | SIMD : unit t
  10. | Labeled_tuples : unit t
  11. | Small_numbers : 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.

module Exist : sig ... end
module Exist_pair : sig ... end
val to_string : _ t -> string

Print and parse language extensions; parsing is case-insensitive

val of_string : string -> Exist.t option
val pair_of_string : string -> Exist_pair.t option
val maturity_to_string : maturity -> string
val is_erasable : _ t -> bool

Check if a language extension is "erasable", i.e. whether it can be harmlessly translated to attributes and compiled with the upstream compiler.

module type Language_extension_for_jane_syntax = sig ... end

This module type defines the pieces of functionality used by Jane_syntax_parsing and Jane_syntax so that we can more easily import these modules into ppxlib_jane, without also including all of the Language_extension machinery.

OCaml

Innovation. Community. Security.