sig
type core_type = {
ptyp_desc : Parsetree.core_type_desc;
ptyp_loc : Location.t;
}
and core_type_desc =
Ptyp_any
| Ptyp_var of string
| Ptyp_arrow of Asttypes.label * Parsetree.core_type *
Parsetree.core_type
| Ptyp_tuple of Parsetree.core_type list
| Ptyp_constr of Longident.t * Parsetree.core_type list
| Ptyp_object of Parsetree.core_field_type list
| Ptyp_class of Longident.t * Parsetree.core_type list *
Asttypes.label list
| Ptyp_alias of Parsetree.core_type * string
| Ptyp_variant of Parsetree.row_field list * bool *
Asttypes.label list option
| Ptyp_poly of string list * Parsetree.core_type
| Ptyp_package of Parsetree.package_type
| Ptyp_parens of Parsetree.core_type
and package_type = Longident.t * (string * Parsetree.core_type) list
and core_field_type = {
pfield_desc : Parsetree.core_field_desc;
pfield_loc : Location.t;
}
and core_field_desc = Pfield of string * Parsetree.core_type | Pfield_var
and row_field =
Rtag of Asttypes.label * bool * Parsetree.core_type list
| Rinherit of Parsetree.core_type
type 'a class_infos = {
pci_virt : Asttypes.virtual_flag;
pci_params : string list * Location.t;
pci_name : string;
pci_expr : 'a;
pci_variance : (bool * bool) list;
pci_loc : Location.t;
}
type pattern = {
ppat_desc : Parsetree.pattern_desc;
ppat_loc : Location.t;
}
and pattern_desc =
Ppat_any
| Ppat_var of string
| Ppat_alias of Parsetree.pattern * string
| Ppat_constant of Asttypes.constant
| Ppat_tuple of Parsetree.pattern list
| Ppat_construct of Longident.t * Parsetree.pattern option * bool
| Ppat_variant of Asttypes.label * Parsetree.pattern option
| Ppat_record of (Longident.t * Parsetree.pattern) list *
Asttypes.closed_flag
| Ppat_array of Parsetree.pattern list
| Ppat_or of Parsetree.pattern * Parsetree.pattern
| Ppat_constraint of Parsetree.pattern * Parsetree.core_type
| Ppat_type of Longident.t
| Ppat_lazy of Parsetree.pattern
| Ppat_parens of Parsetree.pattern
type expression = {
pexp_desc : Parsetree.expression_desc;
pexp_loc : Location.t;
}
and expression_desc =
Pexp_ident of Longident.t
| Pexp_constant of Asttypes.constant
| Pexp_let of Asttypes.rec_flag *
(Parsetree.pattern * Parsetree.expression) list *
Parsetree.expression
| Pexp_function of Asttypes.label * Parsetree.expression option *
(Parsetree.pattern * Parsetree.expression) list
| Pexp_apply of Parsetree.expression *
(Asttypes.label * Parsetree.expression) list
| Pexp_match of Parsetree.expression *
(Parsetree.pattern * Parsetree.expression) list
| Pexp_try of Parsetree.expression *
(Parsetree.pattern * Parsetree.expression) list
| Pexp_tuple of Parsetree.expression list
| Pexp_construct of Longident.t * Parsetree.expression option * bool
| Pexp_variant of Asttypes.label * Parsetree.expression option
| Pexp_record of (Longident.t * Parsetree.expression) list *
Parsetree.expression option
| Pexp_field of Parsetree.expression * Longident.t
| Pexp_setfield of Parsetree.expression * Longident.t *
Parsetree.expression
| Pexp_array of Parsetree.expression list
| Pexp_ifthenelse of Parsetree.expression * Parsetree.expression *
Parsetree.expression option
| Pexp_sequence of Parsetree.expression * Parsetree.expression
| Pexp_while of Parsetree.expression * Parsetree.expression
| Pexp_for of string * Parsetree.expression * Parsetree.expression *
Asttypes.direction_flag * Parsetree.expression
| Pexp_constraint of Parsetree.expression * Parsetree.core_type option *
Parsetree.core_type option
| Pexp_when of Parsetree.expression * Parsetree.expression
| Pexp_send of Parsetree.expression * string
| Pexp_new of Longident.t
| Pexp_setinstvar of string * Parsetree.expression
| Pexp_override of (string * Parsetree.expression) list
| Pexp_letmodule of string * Parsetree.module_expr * Parsetree.expression
| Pexp_assert of Parsetree.expression
| Pexp_assertfalse
| Pexp_lazy of Parsetree.expression
| Pexp_poly of Parsetree.expression * Parsetree.core_type option
| Pexp_object of Parsetree.class_structure
| Pexp_newtype of string * Parsetree.expression
| Pexp_pack of Parsetree.module_expr * Parsetree.package_type
| Pexp_open of Longident.t * Parsetree.expression
| Pexp_parens of Parsetree.expression
| Pexp_begend of Parsetree.expression
and value_description = {
pval_type : Parsetree.core_type;
pval_prim : string list;
}
and type_declaration = {
ptype_params : string list;
ptype_cstrs :
(Parsetree.core_type * Parsetree.core_type * Location.t) list;
ptype_kind : Parsetree.type_kind;
ptype_private : Asttypes.private_flag;
ptype_manifest : Parsetree.core_type option;
ptype_variance : (bool * bool) list;
ptype_loc : Location.t;
}
and type_kind =
Ptype_abstract of Parsetree.relations
| Ptype_variant of
(string * Parsetree.core_type list * Parsetree.relations * Location.t)
list
| Ptype_record of
(string * Asttypes.mutable_flag * Parsetree.core_type *
Parsetree.relations * Location.t)
list
and relation_side = Left | Right | Both
and distributivity_direction = Dist_Inverse | Dist_Direct
and rpo_status = Lexicographic | Multiset
and rpo_precedence = int
and generator = { pgen_desc : Longident.t; pgen_loc : Location.t; }
and relations = {
prels_desc : Parsetree.relations_desc;
prels_loc : Location.t;
}
and relations_desc =
Prels_none
| Prels_commented of Parsetree.relations
| Prels_begend of Parsetree.relation list
and relation = { prel_desc : Parsetree.rel_desc; prel_loc : Location.t; }
and rel_desc =
Absorbent of Parsetree.relation_side * Parsetree.generator
| Absorbing of Parsetree.relation_side * Parsetree.generator
| Associative of Parsetree.relation_side
| Commutative of Longident.t option
| Distributive of Parsetree.relation_side * Parsetree.generator *
Parsetree.generator option * Parsetree.distributivity_direction
| Division_by_Absorbent of Parsetree.generator
| Idempotent of Parsetree.relation_side
| Inverse of Parsetree.relation_side * Parsetree.generator *
Parsetree.generator option
| Involutive
| Neutral of Parsetree.relation_side * Parsetree.generator
| Nilpotent of Parsetree.relation_side * Parsetree.generator
| Precedence of Parsetree.rpo_precedence
| Rewrite of Parsetree.pattern * Parsetree.expression
| Status of Parsetree.rpo_status
| Structure_item of Parsetree.structure_item
and exception_declaration = Parsetree.core_type list
and class_type = {
pcty_desc : Parsetree.class_type_desc;
pcty_loc : Location.t;
}
and class_type_desc =
Pcty_constr of Longident.t * Parsetree.core_type list
| Pcty_signature of Parsetree.class_signature
| Pcty_fun of Asttypes.label * Parsetree.core_type * Parsetree.class_type
and class_signature = Parsetree.core_type * Parsetree.class_type_field list
and class_type_field =
Pctf_inher of Parsetree.class_type
| Pctf_val of
(string * Asttypes.mutable_flag * Asttypes.virtual_flag *
Parsetree.core_type * Location.t)
| Pctf_virt of
(string * Asttypes.private_flag * Parsetree.core_type * Location.t)
| Pctf_meth of
(string * Asttypes.private_flag * Parsetree.core_type * Location.t)
| Pctf_cstr of (Parsetree.core_type * Parsetree.core_type * Location.t)
and class_description = Parsetree.class_type Parsetree.class_infos
and class_type_declaration = Parsetree.class_type Parsetree.class_infos
and class_expr = {
pcl_desc : Parsetree.class_expr_desc;
pcl_loc : Location.t;
}
and class_expr_desc =
Pcl_constr of Longident.t * Parsetree.core_type list
| Pcl_structure of Parsetree.class_structure
| Pcl_fun of Asttypes.label * Parsetree.expression option *
Parsetree.pattern * Parsetree.class_expr
| Pcl_apply of Parsetree.class_expr *
(Asttypes.label * Parsetree.expression) list
| Pcl_let of Asttypes.rec_flag *
(Parsetree.pattern * Parsetree.expression) list *
Parsetree.class_expr
| Pcl_constraint of Parsetree.class_expr * Parsetree.class_type
| Pcl_parens of Parsetree.class_expr
and class_structure = Parsetree.pattern * Parsetree.class_field list
and class_field =
Pcf_inher of Asttypes.override_flag * Parsetree.class_expr *
string option
| Pcf_valvirt of
(string * Asttypes.mutable_flag * Parsetree.core_type * Location.t)
| Pcf_val of
(string * Asttypes.mutable_flag * Asttypes.override_flag *
Parsetree.expression * Location.t)
| Pcf_virt of
(string * Asttypes.private_flag * Parsetree.core_type * Location.t)
| Pcf_meth of
(string * Asttypes.private_flag * Asttypes.override_flag *
Parsetree.expression * Location.t)
| Pcf_cstr of (Parsetree.core_type * Parsetree.core_type * Location.t)
| Pcf_let of Asttypes.rec_flag *
(Parsetree.pattern * Parsetree.expression) list * Location.t
| Pcf_init of Parsetree.expression
and class_declaration = Parsetree.class_expr Parsetree.class_infos
and module_type = {
pmty_desc : Parsetree.module_type_desc;
pmty_loc : Location.t;
}
and module_type_desc =
Pmty_ident of Longident.t
| Pmty_signature of Parsetree.signature
| Pmty_functor of string * Parsetree.module_type * Parsetree.module_type
| Pmty_with of Parsetree.module_type *
(Longident.t * Parsetree.with_constraint) list
| Pmty_typeof of Parsetree.module_expr
| Pmty_parens of Parsetree.module_type
and signature = Parsetree.signature_item list
and signature_item = {
psig_desc : Parsetree.signature_item_desc;
psig_loc : Location.t;
}
and signature_item_desc =
Psig_value of string * Parsetree.value_description
| Psig_type of (string * Parsetree.type_declaration) list
| Psig_exception of string * Parsetree.exception_declaration
| Psig_module of string * Parsetree.module_type
| Psig_recmodule of (string * Parsetree.module_type) list
| Psig_modtype of string * Parsetree.modtype_declaration
| Psig_open of Longident.t
| Psig_include of Parsetree.module_type
| Psig_class of Parsetree.class_description list
| Psig_class_type of Parsetree.class_type_declaration list
and modtype_declaration =
Pmodtype_abstract
| Pmodtype_manifest of Parsetree.module_type
and with_constraint =
Pwith_type of Parsetree.type_declaration
| Pwith_module of Longident.t
| Pwith_typesubst of Parsetree.type_declaration
| Pwith_modsubst of Longident.t
and module_expr = {
pmod_desc : Parsetree.module_expr_desc;
pmod_loc : Location.t;
}
and module_expr_desc =
Pmod_ident of Longident.t
| Pmod_structure of Parsetree.structure
| Pmod_functor of string * Parsetree.module_type * Parsetree.module_expr
| Pmod_apply of Parsetree.module_expr * Parsetree.module_expr
| Pmod_constraint of Parsetree.module_expr * Parsetree.module_type
| Pmod_unpack of Parsetree.expression * Parsetree.package_type
| Pmod_parens of Parsetree.module_expr
and structure = Parsetree.structure_item list
and structure_item = {
pstr_desc : Parsetree.structure_item_desc;
pstr_loc : Location.t;
}
and structure_item_desc =
Pstr_eval of Parsetree.expression
| Pstr_value of Asttypes.rec_flag *
(Parsetree.pattern * Parsetree.expression) list
| Pstr_primitive of string * Parsetree.value_description
| Pstr_type of (string * Parsetree.type_declaration) list
| Pstr_exception of string * Parsetree.exception_declaration
| Pstr_exn_rebind of string * Longident.t
| Pstr_module of string * Parsetree.module_expr
| Pstr_recmodule of
(string * Parsetree.module_type * Parsetree.module_expr) list
| Pstr_modtype of string * Parsetree.module_type
| Pstr_open of Longident.t
| Pstr_class of Parsetree.class_declaration list
| Pstr_class_type of Parsetree.class_type_declaration list
| Pstr_include of Parsetree.module_expr
type toplevel_phrase =
Ptop_def of Parsetree.structure
| Ptop_dir of string * Parsetree.directive_argument
and directive_argument =
Pdir_none
| Pdir_string of string
| Pdir_int of int
| Pdir_ident of Longident.t
| Pdir_bool of bool
end