package ppxlib_jane

  1. Overview
  2. Docs

Module Ppxlib_janeSource

Sourcemodule Shim : sig ... end

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 Ast_builder : sig ... end

Jane Street-internal extensions to Ppxlib.Ast_builder. The bindings below (Default, Make, etc.) are parallel to bindings exported from Ppxlib.Ast_builder.

Sourcemodule Ast_traverse : sig ... end
Sourcemodule Jane_syntax : sig ... end

Syntax for Jane Street's novel syntactic features. This module provides three things:

Sourcemodule Legacy_pexp_function : sig ... end

Use of this module is discouraged.

Common helper functions

Similar to Ppxlib.get_type_param_name, but also tells you the jkind of the variable. Raises a located error in case of failure. The type parameter should not be _. One way to ensure this is to get the type from Ppxlib.name_type_params_in_td (or one of the similarly-named functions).

Common Jane Street helper types

Sourcetype modality = Shim.Modality.t =
  1. | Modality of string
Sourcetype mode = Shim.Mode.t =
  1. | Mode of string
Sourcetype modes = Shim.Modes.t
Sourcetype arrow_result = Shim.arrow_result = {
  1. result_modes : modes;
  2. result_type : Ppxlib_ast.Parsetree.core_type;
}
Sourcetype arrow_argument = Shim.arrow_argument = {
  1. arg_label : Ppxlib_ast.Asttypes.arg_label;
  2. arg_modes : modes;
  3. arg_type : Ppxlib_ast.Parsetree.core_type;
}
Sourcemodule For_testing : sig ... end