jon.recoil.org

Module Ocaml_typing.Typetexp

type jkind_initialization_choice =
  1. | Sort
  2. | Any
module TyVarEnv : sig ... end
val valid_tyvar_name : string -> bool

transl_label lbl ty produces a Typedtree argument label for an argument with label lbl and type ty.

Position arguments (lbl:[%call_pos] -> ...) are parsed as Labelled l. This function converts them to Position l when the type is of the form [%call_pos].

Produces a Typedtree argument label, as well as the pattern corresponding to the argument. transl_label lbl pat is equal to:

  • Position l, P when lbl is Labelled l and pat represents (P : [%call_pos])
  • transl_label lbl None, pat otherwise.

Like transl_label_from_pat, but with special handling for expressions (E : [%call_pos]) instead of for patterns.

val get_type_param_name : Ocaml_parsing.Parsetree.core_type -> string option
exception Already_bound
type value_loc =
  1. | Tuple
  2. | Poly_variant
  3. | Object_field
type sort_loc =
  1. | Fun_arg
  2. | Fun_ret
type cannot_quantify_reason
type jkind_info
type unbound_variable_reason
type error =
  1. | Unbound_type_variable of string * string list * Ocaml_typing.Typetexp.unbound_variable_reason option
  2. | No_type_wildcards of Ocaml_typing.Typetexp.unbound_variable_reason option
  3. | Undefined_type_constructor of Ocaml_typing.Path.t
  4. | Type_arity_mismatch of Ocaml_parsing.Longident.t * int * int
  5. | Bound_type_variable of string
  6. | Recursive_type
  7. | Type_mismatch of Ocaml_typing.Errortrace.unification_error
  8. | Alias_type_mismatch of Ocaml_typing.Errortrace.unification_error
  9. | Present_has_conjunction of string
  10. | Present_has_no_type of string
  11. | Constructor_mismatch of Ocaml_typing.Types.type_expr * Ocaml_typing.Types.type_expr
  12. | Not_a_variant of Ocaml_typing.Types.type_expr
  13. | Variant_tags of string * string
  14. | Invalid_variable_name of string
  15. | Cannot_quantify of string * Ocaml_typing.Typetexp.cannot_quantify_reason
  16. | Bad_univar_jkind of {
    1. name : string;
    2. jkind_info : Ocaml_typing.Typetexp.jkind_info;
    3. inferred_jkind : Ocaml_typing.Types.jkind_lr;
    }
  17. | Multiple_constraints_on_type of Ocaml_parsing.Longident.t
  18. | Method_mismatch of string * Ocaml_typing.Types.type_expr * Ocaml_typing.Types.type_expr
  19. | Opened_object of Ocaml_typing.Path.t option
  20. | Not_an_object of Ocaml_typing.Types.type_expr
  21. | Unsupported_extension : _ Ocaml_parsing.Language_extension.t -> Ocaml_typing.Typetexp.error
  22. | Polymorphic_optional_param
  23. | Non_value of {
    1. vloc : Ocaml_typing.Typetexp.value_loc;
    2. typ : Ocaml_typing.Types.type_expr;
    3. err : Ocaml_typing.Jkind.Violation.t;
    }
  24. | Non_sort of {
    1. vloc : Ocaml_typing.Typetexp.sort_loc;
    2. typ : Ocaml_typing.Types.type_expr;
    3. err : Ocaml_typing.Jkind.Violation.t;
    }
  25. | Bad_jkind_annot of Ocaml_typing.Types.type_expr * Ocaml_typing.Jkind.Violation.t
  26. | Did_you_mean_unboxed of Ocaml_parsing.Longident.t
  27. | Invalid_label_for_call_pos of Ocaml_parsing.Parsetree.arg_label
  28. | Invalid_variable_stage of {
    1. name : string;
    2. intro_stage : Ocaml_typing.Env.stage;
    3. usage_stage : Ocaml_typing.Env.stage;
    }