module TypeErrors: sig
.. end
Everything you ever dreamed of for reporting errors.
type
raw_error =
Clients of this module will want to use the various errors offered.
val parse_warn_error : string -> unit
Set up the module to take into account the warn / error / silent settings
specified on the command-line.
val raise_error : TypeCore.env -> raw_error -> 'a
This function raises an exception that will be later on catched in
Driver
.
val may_raise_error : TypeCore.env -> raw_error -> unit
This function may raise an exception that will be later on catched in
Driver
, or emit a warning, or do nothing, depending on whether the error
has been tweaked with the warn/error string.
type
error
exception TypeCheckerError of error
And this is the exception that you can catch.
val print_error : Buffer.t -> error -> unit
Once an exception is catched, it can be printed with
Log.error
and
%a
...
val html_error : error -> unit
... or displayed as an HTML error.
val fold_type : TypeCore.env -> TypeCore.typ -> TypeCore.typ option
This is only for display purposes.