package ppxlib_jane

  1. Overview
  2. Docs

Module Ppxlib_jane.ShimSource

This file can have a different implementation in the Jane Street experimental compiler and the upstream compiler, allowing ppxes to easily work with both versions

Sourcemodule Mode : sig ... end
Sourcemodule Modes : sig ... end
Sourcemodule Include_kind : sig ... end
Sourcetype arrow_argument = {
  1. arg_label : Ppxlib_ast.Asttypes.arg_label;
  2. arg_modes : Modes.t;
  3. arg_type : Ppxlib_ast.Parsetree.core_type;
}

Function arguments; a value of this type represents:

  • arg_mode arg_type -> ... when arg_label is Nolabel,
  • l:arg_mode arg_type -> ... when arg_label is Labelled, and
  • ?l:arg_mode arg_type -> ... when arg_label is Optional.
Sourcetype arrow_result = {
  1. result_modes : Modes.t;
  2. result_type : Ppxlib_ast.Parsetree.core_type;
}

Function return types; a value of this type represents ... -> result_mode result_type.

Sourcemodule Modality : sig ... end
Sourcemodule Modalities : sig ... end
Sourcemodule Pcstr_tuple_arg : sig ... end

A list of this type is stored in the Pcstr_tuple constructor of constructor_arguments. With JS extensions, fields in constructors can contain modalities.

Sourcemodule Label_declaration : sig ... end

This is an interface around the Parsetree.label_declaration type, describing one label in a record declaration.

Sourcemodule Value_description : sig ... end
Sourcemodule Value_binding : sig ... end
Sourcetype jkind_const_annotation = string Astlib.Location.loc
Sourcetype jkind_annotation =
  1. | Default
  2. | Abbreviation of jkind_const_annotation
  3. | Mod of jkind_annotation * Modes.t
  4. | With of jkind_annotation * Ppxlib_ast.Parsetree.core_type
  5. | Kind_of of Ppxlib_ast.Parsetree.core_type
  6. | Product of jkind_annotation list
Sourcemodule Pexp_function : sig ... end

Match and construct Pexp_function, as in the OCaml parsetree at or after 5.2.

Sourcemodule Core_type_desc : sig ... end
Sourcemodule Core_type : sig ... end
Sourcemodule Pattern_desc : sig ... end
Sourcemodule Expression_desc : sig ... end
Sourcemodule Include_infos : sig ... end
Sourcemodule Signature_item_desc : sig ... end