package merlin-lib
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=5642cde8486a84aad98fa5c590b70e8dcc6074d7fbdb3b9b8c46b2c5b42f653b
sha512=1d7a7751157e393d3ae248ef5ae24a6b4e81430666c61cc51a3d0ec35804523317036f3d7a3c7f18a7554337f4e5f5989fb677865b261ece3fd2b317903570ba
doc/merlin-lib.ocaml_typing/Ocaml_typing/Errortrace/index.html
Module Ocaml_typing.ErrortraceSource
trivial_expansion ty creates an expanded_type whose expansion is also ty. Usually, you want Ctype.expand_type instead, since the expansion carries useful information; however, in certain circumstances, the error is about the expansion of the type, meaning that actually performing the expansion produces more confusing or inaccurate output.
map_diff f {expected;got} is {expected=f expected; got=f got}
type 'a escape_kind = | Constructor of Path.t| Univ of Types.type_expr| Self| Module_type of Path.t| Module of Ident.t| Equation of 'a| Constraint
Scope escape related errors
Type indices
type 'variety variant = | Incompatible_types_for : string -> _ variant| No_intersection : unification variant| Fixed_row : position * fixed_row_case * Types.fixed_explanation -> unification variant| Presence_not_guaranteed_for : position * string -> comparison variant| Openness : position -> comparison variant
type first_class_module = | Package_cannot_scrape of Path.t| Package_inclusion of Ocaml_utils.Format_doc.doc| Package_coercion of Ocaml_utils.Format_doc.doc
type univar = | Var_mismatch of {order : order;diff : Types.type_expr diff;
}| Quantification_mismatch of Types.type_expr list
type ('a, 'variety) elt = | Diff : 'a diff -> ('a, _) elt| Variant : 'variety variant -> ('a, 'variety) elt| Obj : 'variety obj -> ('a, 'variety) elt| Escape : 'a escape -> ('a, _) elt| Function_label_mismatch of Ocaml_parsing.Asttypes.arg_label diff| Tuple_label_mismatch of string option diff| Incompatible_fields : {name : string;diff : Types.type_expr diff;
} -> ('a, _) elt| First_class_module : first_class_module -> ('a, _) elt| Univar of univar| Rec_occur : Types.type_expr * Types.type_expr -> ('a, _) elt
val map_types :
(Types.type_expr -> Types.type_expr) ->
(expanded_type, 'variety) t ->
(expanded_type, 'variety) tmerlin specific
val incompatible_fields :
name:string ->
got:Types.type_expr ->
expected:Types.type_expr ->
(Types.type_expr, _) eltThe traces ('variety t) are the core error types. However, we bundle them up into three "top-level" error types, which are used elsewhere: unification_error, equality_error, and moregen_error. In the case of equality_error, this has to bundle in extra information; in general, it distinguishes the three types of errors and allows us to distinguish traces that are being built (or processed) from those that are complete and have become the final error. These error types have the invariants that their traces are nonempty; we ensure that through three smart constructors with matching names.
type equality_error = private {trace : comparison error;subst : (Types.type_expr * Types.type_expr) list;
}val equality_error :
trace:comparison error ->
subst:(Types.type_expr * Types.type_expr) list ->
equality_errorWraps up the two different kinds of comparison errors in one type
Lift swap_trace to unification_error