Melange_compiler_libs.Outcometree
An out_name
is a string representation of an identifier which can be rewritten on the fly to avoid name collisions
type out_value =
| Oval_array(list(out_value))
| Oval_char(char)
| Oval_constr(out_ident, list(out_value))
| Oval_ellipsis
| Oval_float(float)
| Oval_int(int)
| Oval_int32(int32)
| Oval_int64(int64)
| Oval_nativeint(nativeint)
| Oval_list(list(out_value))
| Oval_printer(Stdlib.Format.formatter => unit)
| Oval_record(list((out_ident, out_value)))
| Oval_string(string, int, out_string)
| Oval_stuff(string)
| Oval_tuple(list(out_value))
| Oval_variant(string, option(out_value))
;
type out_type =
| Otyp_abstract
| Otyp_open
| Otyp_alias of {
non_gen: bool,
aliased: out_type,
alias: string,
}
| Otyp_arrow(string, out_type, out_type)
| Otyp_class(out_ident, list(out_type))
| Otyp_constr(out_ident, list(out_type))
| Otyp_manifest(out_type, out_type)
| Otyp_object of {
fields: list((string, out_type)),
open_row: bool,
}
| Otyp_record(list((string, bool, out_type)))
| Otyp_stuff(string)
| Otyp_sum(list(out_constructor))
| Otyp_tuple(list(out_type))
| Otyp_var(bool, string)
| Otyp_variant(out_variant, bool, option(list(string)))
| Otyp_poly(list(string), out_type)
| Otyp_module(out_ident, list((string, out_type)))
| Otyp_attribute(out_type, out_attribute)
;
type out_class_type =
| Octy_constr(out_ident, list(out_type))
| Octy_arrow(string, out_type, out_class_type)
| Octy_signature(option(out_type), list(out_class_sig_item))
;
type out_module_type =
| Omty_abstract
| Omty_functor(option((option(string), out_module_type)), out_module_type)
| Omty_ident(out_ident)
| Omty_signature(list(out_sig_item))
| Omty_alias(out_ident)
;
and out_sig_item =
| Osig_class(bool, string, list(out_type_param), out_class_type, out_rec_status)
| Osig_class_type(bool, string, list(out_type_param), out_class_type, out_rec_status)
| Osig_typext(out_extension_constructor, out_ext_status)
| Osig_modtype(string, out_module_type)
| Osig_module(string, out_module_type, out_rec_status)
| Osig_type(out_type_decl, out_rec_status)
| Osig_value(out_val_decl)
| Osig_ellipsis
;
and out_type_decl = {
otype_name: string,
otype_params: list(out_type_param),
otype_type: out_type,
otype_private: Asttypes.private_flag,
otype_immediate: Type_immediacy.t,
otype_unboxed: bool,
otype_cstrs: list((out_type, out_type)),
};
and out_type_extension = {
otyext_name: string,
otyext_params: list(string),
otyext_constructors: list(out_constructor),
otyext_private: Asttypes.private_flag,
};
and out_val_decl = {
oval_name: string,
oval_type: out_type,
oval_prims: list(string),
oval_attributes: list(out_attribute),
};
type out_phrase =
| Ophr_eval(out_value, out_type)
| Ophr_signature(list((out_sig_item, option(out_value))))
| Ophr_exception((exn, out_value))
;