package metapp

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

String constant destructor

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

Coercions

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

Payload construction and extraction

val int_of_payload : Parsetree.payload -> int
val payload_of_int : int -> Parsetree.payload
val string_of_payload : Parsetree.payload -> string
val bool_of_payload : Parsetree.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 -> Asttypes.arg_label * 'a
val nolabels : 'a list -> (Asttypes.arg_label * 'a) list

Generic signature for visitable nodes

type 'a iterator_item = Ast_iterator.iterator -> 'a -> unit
type 'a mapper_item = Ast_mapper.mapper -> 'a -> 'a
type ('cell, 'contents) accessor = {
  1. get : 'cell -> 'contents;
  2. set : 'contents -> 'cell -> 'cell;
}
module type VisitableS = sig ... end

Generic signature for extensible nodes

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

Module expressions

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

Module types

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

Generic signature for expressions and patterns

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

Attribute management

module Attr : sig ... end

Module binding and declaration

include sig ... end
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

val filter : Ast_mapper.mapper

Type construction

module Typ : sig ... end

Type declarations

module Type : 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.