Up

module Typecore

: sig
#
val is_nonexpansive : Typedtree.expression -> bool
#
val type_binding : Env.t -> Asttypes.rec_flag -> Parsetree.value_binding list -> Annot.ident option -> Typedtree.value_binding list * Env.t
#
val type_let : Env.t -> Asttypes.rec_flag -> Parsetree.value_binding list -> Annot.ident option -> Typedtree.value_binding list * Env.t
#
val type_expression : Env.t -> Parsetree.expression -> Typedtree.expression
#
val type_class_arg_pattern : string -> Env.t -> Env.t -> Asttypes.label -> Parsetree.pattern -> Typedtree.pattern * (Ident.t * string Asttypes.loc * Ident.t * Types.type_expr) list * Env.t * Env.t
#
val type_expect : ?in_function:Location.t * Types.type_expr -> Env.t -> Parsetree.expression -> Types.type_expr -> Typedtree.expression
#
val type_exp : Env.t -> Parsetree.expression -> Typedtree.expression
#
val type_approx : Env.t -> Parsetree.expression -> Types.type_expr
#
val option_some : Typedtree.expression -> Typedtree.expression
#
val option_none : Types.type_expr -> Location.t -> Typedtree.expression
#
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 self_coercion : (Path.t * Location.t list Pervasives.ref) list Pervasives.ref
#
type error =
# | Polymorphic_label of Longident.t
# | Constructor_arity_mismatch of Longident.t * int * int
# | Label_mismatch of Longident.t * (Types.type_expr * Types.type_expr) list
# | Pattern_type_clash of (Types.type_expr * Types.type_expr) list
# | Or_pattern_type_clash of Ident.t * (Types.type_expr * Types.type_expr) list
# | Multiply_bound_variable of string
# | Orpat_vars of Ident.t
# | Expr_type_clash of (Types.type_expr * Types.type_expr) list
# | Apply_non_function of Types.type_expr
# | Apply_wrong_label of Asttypes.label * Types.type_expr
# | Label_multiply_defined of string
# | Label_missing of Ident.t list
# | Label_not_mutable of Longident.t
# | Wrong_name of string * Types.type_expr * string * Path.t * Longident.t
# | Name_type_mismatch of string * Longident.t * (Path.t * Path.t) * (Path.t * Path.t) list
# | Invalid_format of string
# | Undefined_method of Types.type_expr * string
# | Undefined_inherited_method of string
# | Virtual_class of Longident.t
# | Private_type of Types.type_expr
# | Private_label of Longident.t * Types.type_expr
# | Unbound_instance_variable of string
# | Instance_variable_not_mutable of bool * string
# | Not_subtype of (Types.type_expr * Types.type_expr) list * (Types.type_expr * Types.type_expr) list
# | Outside_class
# | Value_multiply_overridden of string
# | Coercion_failure of Types.type_expr * Types.type_expr * (Types.type_expr * Types.type_expr) list * bool
# | Too_many_arguments of bool * Types.type_expr
# | Abstract_wrong_label of Asttypes.label * Types.type_expr
# | Scoping_let_module of string * Types.type_expr
# | Masked_instance_variable of Longident.t
# | Not_a_variant_type of Longident.t
# | Incoherent_label_order
# | Less_general of string * (Types.type_expr * Types.type_expr) list
# | Modules_not_allowed
# | Cannot_infer_signature
# | Not_a_packed_module of Types.type_expr
# | Recursive_local_constraint of (Types.type_expr * Types.type_expr) list
# | Unexpected_existential
# | Unqualified_gadt_pattern of Path.t * string
# | Invalid_interval
# | Invalid_for_loop_index
# | No_value_clauses
# | Exception_pattern_below_toplevel
#
exception Error of Location.t * Env.t * error
#
exception Error_forward of Location.error
#
val report_error : Env.t -> Format.formatter -> error -> unit
#
val type_package : (Env.t -> Parsetree.module_expr -> Path.t -> Longident.t list -> Types.type_expr list -> Typedtree.module_expr * Types.type_expr list) Pervasives.ref
#
val create_package_type : Location.t -> Env.t -> Longident.t * (Longident.t * Parsetree.core_type) list -> Path.t * (Longident.t * Typedtree.core_type) list * Types.type_expr
end