package ocaml-base-compiler

  1. Overview
  2. Docs
val is_nonexpansive : Typedtree.expression -> bool
val type_expression : Env.t -> Parsetree.expression -> Typedtree.expression
val type_class_arg_pattern : string -> Env.t -> Env.t -> Asttypes.arg_label -> Parsetree.pattern -> Typedtree.pattern * (Ident.t * string Asttypes.loc * Ident.t * Types.type_expr) list * Env.t * Env.t
val check_partial : ?lev:int -> Env.t -> Types.type_expr -> Location.t -> Typedtree.case list -> Typedtree.partial
val extract_option_type : Env.t -> Types.type_expr -> Types.type_expr
val iter_pattern : (Typedtree.pattern -> unit) -> Typedtree.pattern -> unit
val generalizable : int -> Types.type_expr -> bool
val reset_delayed_checks : unit -> unit
val force_delayed_checks : unit -> unit
val name_pattern : string -> Typedtree.case list -> Ident.t
val self_coercion : (Path.t * Location.t list Pervasives.ref) list Pervasives.ref
type error =
  1. | Polymorphic_label of Longident.t
  2. | Constructor_arity_mismatch of Longident.t * int * int
  3. | Label_mismatch of Longident.t * (Types.type_expr * Types.type_expr) list
  4. | Pattern_type_clash of (Types.type_expr * Types.type_expr) list
  5. | Or_pattern_type_clash of Ident.t * (Types.type_expr * Types.type_expr) list
  6. | Multiply_bound_variable of string
  7. | Orpat_vars of Ident.t * Ident.t list
  8. | Expr_type_clash of (Types.type_expr * Types.type_expr) list
  9. | Apply_non_function of Types.type_expr
  10. | Apply_wrong_label of Asttypes.arg_label * Types.type_expr
  11. | Label_multiply_defined of string
  12. | Label_missing of Ident.t list
  13. | Label_not_mutable of Longident.t
  14. | Wrong_name of string * Types.type_expr * string * Path.t * string * string list
  15. | Name_type_mismatch of string * Longident.t * Path.t * Path.t * (Path.t * Path.t) list
  16. | Invalid_format of string
  17. | Undefined_method of Types.type_expr * string * string list option
  18. | Undefined_inherited_method of string * string list
  19. | Virtual_class of Longident.t
  20. | Private_type of Types.type_expr
  21. | Private_label of Longident.t * Types.type_expr
  22. | Unbound_instance_variable of string * string list
  23. | Instance_variable_not_mutable of bool * string
  24. | Not_subtype of (Types.type_expr * Types.type_expr) list * (Types.type_expr * Types.type_expr) list
  25. | Outside_class
  26. | Value_multiply_overridden of string
  27. | Coercion_failure of Types.type_expr * Types.type_expr * (Types.type_expr * Types.type_expr) list * bool
  28. | Too_many_arguments of bool * Types.type_expr
  29. | Abstract_wrong_label of Asttypes.arg_label * Types.type_expr
  30. | Scoping_let_module of string * Types.type_expr
  31. | Masked_instance_variable of Longident.t
  32. | Not_a_variant_type of Longident.t
  33. | Incoherent_label_order
  34. | Less_general of string * (Types.type_expr * Types.type_expr) list
  35. | Modules_not_allowed
  36. | Cannot_infer_signature
  37. | Not_a_packed_module of Types.type_expr
  38. | Recursive_local_constraint of (Types.type_expr * Types.type_expr) list
  39. | Unexpected_existential
  40. | Unqualified_gadt_pattern of Path.t * string
  41. | Invalid_interval
  42. | Invalid_for_loop_index
  43. | No_value_clauses
  44. | Exception_pattern_below_toplevel
  45. | Inlined_record_escape
  46. | Inlined_record_expected
  47. | Unrefuted_pattern of Typedtree.pattern
  48. | Invalid_extension_constructor_payload
  49. | Not_an_extension_constructor
  50. | Literal_overflow of string
  51. | Unknown_literal of string * char
  52. | Illegal_letrec_pat
  53. | Illegal_letrec_expr
  54. | Illegal_class_expr
exception Error of Location.t * Env.t * error
exception Error_forward of Location.error
val report_error : Env.t -> Format.formatter -> error -> unit
val check_recursive_bindings : Env.t -> Typedtree.value_binding list -> unit
val check_recursive_class_bindings : Env.t -> Ident.t list -> Typedtree.class_expr list -> unit
OCaml

Innovation. Community. Security.