Mlsem_app.Mainmodule MVariable = Mlsem_lang.MVariabletype message =
Mlsem_system.Analyzer.severity
* Mlsem_common.Position.t
* string
* string option
* Mlsem_system.Analyzer.Diagnostic.kind optionSeverity, location, title, description, and the analyzer's diagnostic it comes from, if any.
type derivation = {sig_index : int option;part : int option;env : Mlsem_common.Env.t;expr : Mlsem_system.Ast.t;annot : Mlsem_system.Annot.Annot.t;resolved : Signature.t;}One checking pass of a definition: sig_index is the index of the val declaration it was checked against, if any. expr is the expression checked in the environment env, and annot its derivation, with every typed node's type cached in it. resolved is the type this pass gave, as overloads: several when the body is overloaded.
The definitions of a recursive group are checked together: each one has the derivation of the whole group (the same expr and annot), and part is the index of the definition in the group.
type inferred = {var : Mlsem_common.Variable.t;ty : Mlsem_types.TyScheme.t;sigs : Signature.t;declared : bool;derivations : derivation list;Definitions checked together (without val) share one derivation, carried by the first of them.
}type result = | TSuccess of inferred list * float| TDone| TFailure of Mlsem_common.Variable.t option
* Mlsem_common.Position.t
* string
* string option
* float
* Mlsem_lang.Error.t optionThe defined variable, if any, where it failed, the title and description, the time, and the type error when it is one.
*)type envs =
Mlsem_types.Builder.benv
* Mlsem_common.Variable.t NameMap.t
* Signature.t Mlsem_common.VarMap.t
* Mlsem_common.Env.t
* Mlsem_types.PEnv.tval treat :
envs ->
('a Mlsem_common.Position.located * PAst.element) ->
envs * outputval treat_sig :
envs ->
('a Mlsem_common.Position.located * PAst.element) ->
envs * outputval treat_def :
envs ->
('a Mlsem_common.Position.located * PAst.element) ->
envs * outputval treat_all_sigs :
envs ->
('a Mlsem_common.Position.located * PAst.element) list ->
envs * outputval initial_envs : envsval initial_senv : Signature.t Mlsem_common.VarMap.tval initial_benv : Mlsem_types.Builder.benvval initial_penv : Mlsem_types.PEnv.tval display : envs -> Mlsem_types.TyScheme.t -> stringval display_gty :
?names:Mlsem_types.Subst.t ->
envs ->
Mlsem_types.GTy.t ->
stringnames renames type variables, e.g. to match how display names the variables of a scheme.
val signature : envs -> Signature.t -> string listnames renames type variables, e.g. to match how display names the variables of a scheme.
val build_type : envs -> string -> Mlsem_types.Ty.tval user_type_names : envs -> string listval user_alias_arity : envs -> string -> int optionval user_type_arity : envs -> string -> int optionval parse : [< `File of string | `String of string ] -> parsing_result