package ocaml-base-compiler
Unification traces are used to explain unification errors when printing error messages
type 'a escape =
| Constructor of Path.t
| Univ of Types.type_expr
(*The type_expr argument of
*)Univ
is always aTunivar _
, we keep atype_expr
to track renaming inPrinttyp
| Self
| Module_type of Path.t
| Equation of 'a
Scope escape related errors
Errors for polymorphic variants
type variant =
| No_intersection
| Incompatible_types_for of string
| Fixed_row of position * fixed_row_case * Types.fixed_explanation
(*Fixed row types, e.g.
*)'a. [> `X] as 'a
type 'a elt =
| Diff of 'a diff
| Variant of variant
| Obj of obj
| Escape of {
context : Types.type_expr option;
kind : 'a escape;
}
| Incompatible_fields of {
name : string;
diff : Types.type_expr diff;
}
| Rec_occur of Types.type_expr * Types.type_expr
val diff : Types.type_expr -> Types.type_expr -> desc elt
map_diff f {expected;got}
is {expected=f expected; got=f got}
val flatten : (Types.type_expr -> Types.type_expr -> 'a) -> t -> 'a elt list
flatten f trace
flattens all elements of type desc
in trace
to either f x.t expanded
if x.expanded=Some expanded
or f x.t x.t
otherwise
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>