Melange_compiler_libs.Ast_helper
Helpers to produce Parsetree fragments
Warning This module is unstable and part of compiler-libs.
type with_loc('a) = Location.loc('a);
type loc = Location.t;
type lid = with_loc(Longident.t);
type str = with_loc(string);
type str_opt = with_loc(option(string));
type attrs = list(Parsetree.attribute);
let default_loc: Stdlib.ref(loc);
Default value for all optional location arguments.
let with_default_loc: loc => (unit => 'a) => 'a;
Set the default_loc
within the scope of the execution of the provided function.
module Const: { ... };
module Attr: { ... };
module Typ: { ... };
Type expressions
module Pat: { ... };
Patterns
module Exp: { ... };
Expressions
module Val: { ... };
Value declarations
module Type: { ... };
Type declarations
module Te: { ... };
Type extensions
module Mty: { ... };
Module type expressions
module Mod: { ... };
Module expressions
module Sig: { ... };
Signature items
module Str: { ... };
Structure items
module Md: { ... };
Module declarations
module Ms: { ... };
Module substitutions
module Mtd: { ... };
Module type declarations
module Mb: { ... };
Module bindings
module Opn: { ... };
Opens
module Incl: { ... };
Includes
module Vb: { ... };
Value bindings
module Cty: { ... };
Class type expressions
module Ctf: { ... };
Class type fields
module Cl: { ... };
Class expressions
module Cf: { ... };
Class fields
module Ci: { ... };
Classes
module Csig: { ... };
Class signatures
module Cstr: { ... };
Class structures
module Rf: { ... };
Row fields
module Of: { ... };
Object fields