package metapp

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
include sig ... end
include sig ... end
val ppxlib_version : int * int * int
val ast_version : int * int

String constant destructor

type string_constant = {
  1. s : string;
  2. loc : Location.t;
  3. delim : string option;
}
val destruct_string_constant : Ppxlib.constant -> string_constant option

Coercions

val int_of_expression : Ppxlib.expression -> int
val string_of_expression : Ppxlib.expression -> string_constant
val string_of_arbitrary_expression : Ppxlib.expression -> string
val bool_of_expression : Ppxlib.expression -> bool
val list_of_expression : Ppxlib.expression -> Ppxlib.expression list
val list_of_tuple : Ppxlib.expression -> Ppxlib.expression list
val structure_of_expression : Ppxlib.expression -> Ppxlib.structure
val lid_of_str : Ast_helper.str -> Ast_helper.lid
val sequence : Ppxlib.expression list -> Ppxlib.expression

Payload construction and extraction

val int_of_payload : Ppxlib.payload -> int
val payload_of_int : int -> Ppxlib.payload
val string_of_payload : Ppxlib.payload -> string
val bool_of_payload : Ppxlib.payload -> bool

Location management

val mkloc : 'a -> 'a Location.loc
val map_loc : ('a -> 'b) -> 'a Location.loc -> 'b Location.loc
val with_loc : ('a -> 'b) -> 'a Location.loc -> 'b

Longident

type 'a comparer = 'a -> 'a -> int
module Longident : sig ... end
val mklid : ?prefix:Longident.t -> string -> Ast_helper.lid

Constructing function application

val nolabel : 'a -> Ppxlib.Asttypes.arg_label * 'a
val nolabels : 'a list -> (Ppxlib.Asttypes.arg_label * 'a) list
val apply : ?attrs:Ppxlib.attributes -> Ppxlib.expression -> ?labels:(string * Ppxlib.expression) list -> ?optional:(string * Ppxlib.expression) list -> Ppxlib.expression list -> Ppxlib.expression

Generic signature for visitable nodes

type 'a iter = 'a -> unit
type 'a map = 'a -> 'a
module type VisitableS = sig ... end

Generic signature for extensible nodes

type destruct_extension = Ppxlib.extension * Ppxlib.attributes
module type ExtensibleS = sig ... end
module type PayloadS = sig ... end
module type ItemS = sig ... end
module Cty : ExtensibleS with type t = Ppxlib.class_type
module Cl : ExtensibleS with type t = Ppxlib.class_expr
module Cf : ExtensibleS with type t = Ppxlib.class_field
module Stri : ItemS with type t := Ppxlib.structure_item
module Str : sig ... end
module Sigi : ItemS with type t := Ppxlib.signature_item
module Sig : sig ... end

Module expressions

type functor_parameter = Ppxlib.functor_parameter =
  1. | Unit
  2. | Named of string option Location.loc * Ppxlib.module_type
module type FunctorS = sig ... end
module type ModS = sig ... end
module Mod : ModS with type t = Ppxlib.module_expr

Module types

module Mty : ModS with type t = Ppxlib.module_type
module Types : sig ... end

Generic signature for expressions and patterns

module type ValueS = sig ... end
module Pat : sig ... end
type value = {
  1. exp : Ppxlib.expression;
  2. pat : Ppxlib.pattern;
}
module Value : ValueS with type t = value

Attribute management

module Attr : sig ... end

Module binding and declaration

type module_name = string option
val module_name_of_string_option : string option -> module_name
val string_option_of_module_name : module_name -> string option
module Md : sig ... end
module Mb : sig ... end

Mapper for [@if bool] notation

Type construction

module Typ : sig ... end

Type declarations

module Type : sig ... end

Extension constructors

module Te : sig ... end

Open

module Opn : sig ... end

Expressions

module Exp : sig ... end

Row fields

module Rf : sig ... end

The module `Rf` has been introduced in Ast_helper with OCaml 4.08.0 (as row_field type switched to a record representation). Moreover, even the current Ast_helper.Rf.inherit_ (OCaml 4.10.0) misses the ?attrs flag.

Object fields

module Of : sig ... end

With constraint

module With : sig ... end

General purpose functions

val compare_pair : 'a comparer -> 'b comparer -> ('a * 'b) comparer
val compare_list : 'a comparer -> 'a list comparer
val update : ('a -> 'b * 'a) -> 'a Stdcompat.ref -> 'b
val mutate : ('a -> 'a) -> 'a Stdcompat.ref -> unit
val extract_first : ('a -> 'b option) -> 'a list -> ('b * 'a list) option
module Accu : sig ... end

Indexed accumulator to build an array.