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 raise_error : TypeCore.env -> raw_error -> 'a
This function raises an exception that will be later on catched in
Driver.
val warn_or_error : TypeCore.env -> raw_error -> unit
This function will emit a warning or potentially raise an error, depending
on the runtime flags.
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.