Module Ocaml_typing.Outcometree

type out_name = {
  1. mutable printed_name : string;
}

An out_name is a string representation of an identifier which can be rewritten on the fly to avoid name collisions

type out_ident =
  1. | Oide_apply of out_ident * out_ident
  2. | Oide_dot of out_ident * string
  3. | Oide_ident of out_name
  4. | Oide_hash of out_ident
type out_string =
  1. | Ostr_string
  2. | Ostr_bytes
type out_attribute = {
  1. oattr_name : string;
}
type out_value =
  1. | Oval_array of out_value list * Ocaml_parsing.Asttypes.mutable_flag
  2. | Oval_char of char
  3. | Oval_constr of out_ident * out_value list
  4. | Oval_ellipsis
  5. | Oval_float of float
  6. | Oval_float32 of Obj.t
  7. | Oval_int of int
  8. | Oval_int8 of int
  9. | Oval_int16 of int
  10. | Oval_int32 of int32
  11. | Oval_int64 of int64
  12. | Oval_nativeint of nativeint
  13. | Oval_list of out_value list
  14. | Oval_printer of Format.formatter -> unit
  15. | Oval_record of (out_ident * out_value) list
  16. | Oval_record_unboxed_product of (out_ident * out_value) list
  17. | Oval_string of string * int * out_string
  18. | Oval_stuff of string
  19. | Oval_tuple of (string option * out_value) list
  20. | Oval_unboxed_tuple of (string option * out_value) list
  21. | Oval_variant of string * out_value option
  22. | Oval_lazy of out_value
  23. | Oval_code of CamlinternalQuote.Code.t
type out_modality = string
type out_atomicity =
  1. | Atomic
  2. | Nonatomic
type out_mutability =
  1. | Om_immutable
  2. | Om_mutable of string option * out_atomicity
type arg_label =
  1. | Nolabel
  2. | Labelled of string
  3. | Optional of string
  4. | Position of string

This definition avoids a cyclic dependency between Outcometree and Types.

type out_mode = string
type out_arg_mode = out_mode list
type out_ret_mode =
  1. | Orm_any of out_mode list
    (*

    The ret type could be anything, with modes annotating.

    *)
  2. | Orm_no_parens
    (*

    The ret type is arrow, and no need to print parens around the arrow

    *)
  3. | Orm_parens of out_mode list
    (*

    The ret type is arrow, and need to print parens around the arrow, with modes annotating.

    *)
type out_jkind_const =
  1. | Ojkind_const_default
  2. | Ojkind_const_abbreviation of string
    (*

    The base of Ojkind_const_mod is optional to enable printing individual axes

    *)
  3. | Ojkind_const_mod of out_jkind_const option * string list
  4. | Ojkind_const_with of out_jkind_const * out_type * out_modality list
  5. | Ojkind_const_kind_of of out_type
  6. | Ojkind_const_product of out_jkind_const list

Represents a constant jkind

and out_jkind =
  1. | Ojkind_const of out_jkind_const
  2. | Ojkind_var of string
  3. | Ojkind_product of out_jkind list
and out_vars_jkinds = (string * out_jkind option) list
and out_type_param = {
  1. ot_non_gen : bool;
  2. ot_name : string;
  3. ot_variance : Ocaml_parsing.Asttypes.variance * Ocaml_parsing.Asttypes.injectivity;
  4. ot_jkind : out_jkind option;
}
and out_type =
  1. | Otyp_abstract
  2. | Otyp_open
  3. | Otyp_alias of {
    1. non_gen : bool;
    2. aliased : out_type;
    3. alias : string;
    }
  4. | Otyp_arrow of arg_label * out_arg_mode * out_type * out_type
    (*

    INVARIANT: the out_type for the return must be Otyp_ret.

    *)
  5. | Otyp_class of out_ident * out_type list
  6. | Otyp_constr of out_ident * out_type list
  7. | Otyp_manifest of out_type * out_type
  8. | Otyp_object of {
    1. fields : (string * out_type) list;
    2. open_row : bool;
    }
  9. | Otyp_record of (string * out_mutability * out_type * out_modality list) list
  10. | Otyp_record_unboxed_product of (string * out_mutability * out_type * out_modality list) list
  11. | Otyp_stuff of string
  12. | Otyp_sum of out_constructor list
  13. | Otyp_tuple of (string option * out_type) list
  14. | Otyp_unboxed_tuple of (string option * out_type) list
  15. | Otyp_var of bool * string
  16. | Otyp_variant of out_variant * bool * string list option
  17. | Otyp_quote of out_type
  18. | Otyp_splice of out_type
  19. | Otyp_poly of out_vars_jkinds * out_type
  20. | Otyp_module of out_ident * (string * out_type) list
  21. | Otyp_attribute of out_type * out_attribute
  22. | Otyp_jkind_annot of out_type * out_jkind
  23. | Otyp_of_kind of out_jkind
  24. | Otyp_ret of out_ret_mode * out_type
    (*

    INVARIANT: See out_ret_mode.

    *)
and out_constructor = {
  1. ocstr_name : string;
  2. ocstr_args : (out_type * out_modality list) list;
  3. ocstr_return_type : (out_vars_jkinds * out_type) option;
}
and out_variant =
  1. | Ovar_fields of (string * bool * out_type list) list
  2. | Ovar_typ of out_type
type out_class_type =
  1. | Octy_constr of out_ident * out_type list
  2. | Octy_arrow of arg_label * out_type * out_class_type
  3. | Octy_signature of out_type option * out_class_sig_item list
and out_class_sig_item =
  1. | Ocsg_constraint of out_type * out_type
  2. | Ocsg_method of string * bool * bool * out_type
  3. | Ocsg_value of string * bool * bool * out_type
type out_module_type =
  1. | Omty_abstract
  2. | Omty_functor of (string option * out_module_type) option * out_module_type
  3. | Omty_ident of out_ident
  4. | Omty_signature of out_sig_item list
  5. | Omty_alias of out_ident
  6. | Omty_hole
  7. | Omty_strengthen of out_module_type * out_ident * bool
and out_sig_item =
  1. | Osig_class of bool * string * out_type_param list * out_class_type * out_rec_status
  2. | Osig_class_type of bool * string * out_type_param list * out_class_type * out_rec_status
  3. | Osig_typext of out_extension_constructor * out_ext_status
  4. | Osig_modtype of string * out_module_type
  5. | Osig_module of string * out_module_type * out_modality list * out_rec_status
  6. | Osig_type of out_type_decl * out_rec_status
  7. | Osig_value of out_val_decl
  8. | Osig_ellipsis
and out_type_decl = {
  1. otype_name : string;
  2. otype_params : out_type_param list;
  3. otype_type : out_type;
  4. otype_private : Ocaml_parsing.Asttypes.private_flag;
  5. otype_jkind : out_jkind option;
  6. otype_unboxed : bool;
  7. otype_or_null_reexport : bool;
  8. otype_cstrs : (out_type * out_type) list;
  9. otype_attributes : out_attribute list;
}
and out_extension_constructor = {
  1. oext_name : string;
  2. oext_type_name : string;
  3. oext_type_params : string list;
  4. oext_args : (out_type * out_modality list) list;
  5. oext_ret_type : (out_vars_jkinds * out_type) option;
  6. oext_private : Ocaml_parsing.Asttypes.private_flag;
}
and out_type_extension = {
  1. otyext_name : string;
  2. otyext_params : string list;
  3. otyext_constructors : out_constructor list;
  4. otyext_private : Ocaml_parsing.Asttypes.private_flag;
}
and out_val_decl = {
  1. oval_name : string;
  2. oval_type : out_type;
  3. oval_modalities : out_modality list;
  4. oval_prims : string list;
  5. oval_attributes : out_attribute list;
}
and out_rec_status =
  1. | Orec_not
  2. | Orec_first
  3. | Orec_next
and out_ext_status =
  1. | Oext_first
  2. | Oext_next
  3. | Oext_exception
type out_phrase =
  1. | Ophr_eval of out_value * out_type
  2. | Ophr_signature of (out_sig_item * out_value option) list
  3. | Ophr_exception of exn * out_value