Module Typedtree
type partial =
| Partial
| Total
type optional =
| Required
| Optional
type attribute = Parsetree.attribute
type attributes = attribute list
type pattern_desc =
| Tpat_any
| Tpat_constant of Asttypes.constant
| Tpat_tuple of pattern list
| Tpat_record of (Longident.t Asttypes.loc * Types.label_description * pattern) list * Asttypes.closed_flag
| Tpat_array of pattern list
| Tpat_lazy of pattern
type expression_desc =
| Texp_constant of Asttypes.constant
| Texp_let of Asttypes.rec_flag * value_binding list * expression
| Texp_function of Asttypes.label * case list * partial
| Texp_apply of expression * (Asttypes.label * expression option * optional) list
| Texp_match of expression * case list * case list * partial
| Texp_try of expression * case list
| Texp_tuple of expression list
| Texp_variant of Asttypes.label * expression option
| Texp_record of (Longident.t Asttypes.loc * Types.label_description * expression) list * expression option
| Texp_array of expression list
| Texp_ifthenelse of expression * expression * expression option
| Texp_sequence of expression * expression
| Texp_while of expression * expression
| Texp_for of Ident.t * Parsetree.pattern * expression * expression * Asttypes.direction_flag * expression
| Texp_send of expression * meth * expression option
| Texp_assert of expression
| Texp_lazy of expression
| Texp_object of class_structure * string list
| Texp_pack of module_expr
type case = {
c_lhs : pattern;
c_guard : expression option;
c_rhs : expression;
}
type class_expr_desc =
| Tcl_structure of class_structure
| Tcl_fun of Asttypes.label * pattern * (Ident.t * string Asttypes.loc * expression) list * class_expr * partial
| Tcl_apply of class_expr * (Asttypes.label * expression option * optional) list
type class_field_kind =
| Tcfk_virtual of core_type
| Tcfk_concrete of Asttypes.override_flag * expression
type class_field_desc =
| Tcf_inherit of Asttypes.override_flag * class_expr * string option * (string * Ident.t) list * (string * Ident.t) list
| Tcf_method of string Asttypes.loc * Asttypes.private_flag * class_field_kind
| Tcf_constraint of core_type * core_type
| Tcf_initializer of expression
| Tcf_attribute of attribute
type module_type_constraint =
| Tmodtype_implicit
| Tmodtype_explicit of module_type
type module_expr_desc =
| Tmod_structure of structure
| Tmod_apply of module_expr * module_expr * module_coercion
type structure_item_desc =
| Tstr_eval of expression * attributes
| Tstr_value of Asttypes.rec_flag * value_binding list
| Tstr_primitive of value_description
| Tstr_type of type_declaration list
| Tstr_typext of type_extension
| Tstr_exception of extension_constructor
| Tstr_module of module_binding
| Tstr_recmodule of module_binding list
| Tstr_modtype of module_type_declaration
| Tstr_open of open_description
| Tstr_class of (class_declaration * string list * Asttypes.virtual_flag) list
| Tstr_include of include_declaration
| Tstr_attribute of attribute
type module_type_desc =
| Tmty_signature of signature
| Tmty_typeof of module_expr
type signature_item_desc =
| Tsig_value of value_description
| Tsig_type of type_declaration list
| Tsig_typext of type_extension
| Tsig_exception of extension_constructor
| Tsig_module of module_declaration
| Tsig_recmodule of module_declaration list
| Tsig_modtype of module_type_declaration
| Tsig_open of open_description
| Tsig_include of include_description
| Tsig_class of class_description list
| Tsig_class_type of class_type_declaration list
| Tsig_attribute of attribute
type include_description = module_type include_infos
type include_declaration = module_expr include_infos
type core_type_desc =
| Ttyp_any
| Ttyp_var of string
| Ttyp_arrow of Asttypes.label * core_type * core_type
| Ttyp_tuple of core_type list
| Ttyp_object of (string * attributes * core_type) list * Asttypes.closed_flag
| Ttyp_alias of core_type * string
| Ttyp_variant of row_field list * Asttypes.closed_flag * Asttypes.label list option
| Ttyp_poly of string list * core_type
| Ttyp_package of package_type
type row_field =
| Ttag of Asttypes.label * attributes * bool * core_type list
| Tinherit of core_type
type type_declaration = {
typ_name : string Asttypes.loc;
typ_params : (core_type * Asttypes.variance) list;
typ_type : Types.type_declaration;
typ_kind : type_kind;
typ_private : Asttypes.private_flag;
typ_manifest : core_type option;
typ_attributes : attributes;
}
type type_kind =
| Ttype_abstract
| Ttype_variant of constructor_declaration list
| Ttype_record of label_declaration list
| Ttype_open
type class_signature = {
csig_self : core_type;
csig_fields : class_type_field list;
csig_type : Types.class_signature;
}
type class_type_field_desc =
| Tctf_inherit of class_type
| Tctf_val of (string * Asttypes.mutable_flag * Asttypes.virtual_flag * core_type)
| Tctf_method of (string * Asttypes.private_flag * Asttypes.virtual_flag * core_type)
| Tctf_constraint of (core_type * core_type)
| Tctf_attribute of attribute
type class_declaration = class_expr class_infos
type class_description = class_type class_infos
type class_type_declaration = class_type class_infos
type 'a class_infos = {
ci_virt : Asttypes.virtual_flag;
ci_params : (core_type * Asttypes.variance) list;
ci_id_name : string Asttypes.loc;
ci_expr : 'a;
ci_decl : Types.class_declaration;
ci_type_decl : Types.class_type_declaration;
ci_attributes : attributes;
}
val iter_pattern_desc : pattern -> unit -> pattern_desc -> unit
val map_pattern_desc : pattern -> pattern -> pattern_desc -> pattern_desc
val mknoloc : 'a -> 'a Asttypes.loc