module type ERROR_REPORT = sig end
ERROR_REPORT
given to the library
allows customizing error messages printed when unification, resolution or
comparison fail. A general purpose instance implementation is provided
by Dalton_templates.ErrorReport
.
Unification errors
|
val unification : Format.formatter ->
term1:Dalton_aux.printing ->
term2:Dalton_aux.printing -> explanation:Dalton_aux.printing -> unit
unification ppf ~term1 ~term2 ~explanation
reports an unification
failure of the terms term1
and term2
. explanation
gives a
short explanation of the reason of the failure, generated itself
by one of the functions cycle
or incompatible
.val cycle : Format.formatter ->
variable:Dalton_aux.printing -> term:Dalton_aux.printing -> unit
cycle ppf variable term
prints the explanation of an unification
failure due to the occur-check.val incompatible : Format.formatter ->
term1:Dalton_aux.printing -> term2:Dalton_aux.printing -> unit
cycle ppf ~term1 ~term2
prints the explanation of an unification
failure due to incompatibles type constructors.
Constraints solving errors
|
val ldestr : Format.formatter -> term:Dalton_aux.printing -> unit
ldestr ppf ~term
tells that the left-destructor has been applied
on the type term term
which cannot be so.val rdestr : Format.formatter -> term:Dalton_aux.printing -> unit
rdestr ppf ~term
tells that the right-destructor has been applied
on the type term term
which cannot be so.val inequality : Format.formatter -> lb:Dalton_aux.printing -> ub:Dalton_aux.printing -> unit
inequality ppf ~lb ~ub
tells that a constraint is not satisfiable
because it implies the incorrect inequality lb < ub
between constant
bounds.
Schemes comparison
|
val incompatible_schemes : Format.formatter ->
scheme1:Dalton_aux.printing ->
scheme2:Dalton_aux.printing -> explanation:Dalton_aux.printing -> unit
incompatible_schemes ppf ~scheme1 ~scheme2 ~explanation
reports
that schemes scheme1
and scheme2
are not comparable, because of
an unification error. explanation
gives a
short explanation of the reason of the failure, generated itself
by one of the functions cycle
or incompatible
above.val missing_desc : Format.formatter ->
scheme:Dalton_aux.printing ->
variable:Dalton_aux.printing -> term:Dalton_aux.printing -> unit
missing_desc ppf ~scheme ~variable ~term
reports a comparison failure
due to a variable instatiation.val missing_constraint : Format.formatter ->
scheme:Dalton_aux.printing -> constrain:Dalton_aux.printing -> unit
missing_desc ppf ~scheme ~variable ~term
reports a comparison failure
due to a missing inequality.val missing_bound : Format.formatter ->
scheme:Dalton_aux.printing ->
constrain:Dalton_aux.printing ->
explanation:Dalton_aux.printing option -> unit
missing_desc ppf ~scheme ~variable ~term
reports a comparison failure
due to a missing constant bound.
Minimal instance
|
val minimal : Format.formatter ->
scheme:Dalton_aux.printing -> variables:Dalton_aux.printing -> unit
minimal ppf ~scheme ~variablesx
prints a message telling that the
type scheme scheme
has no minimal instance. variables
prints
a list of the variables of the scheme which do not have a minimal
solution.