Debian Codegraph @

lib/mlrisc-lib/MLRISC/Tools/SourceMap/error.sig

raw
1 (*
2 * Module for simple error handling with filenames/line numbers
3 *)
4 signature MDL_ERROR =
5 sig
6
7 exception Error
8
9 val setLoc : SourceMapping.location -> unit
10 val errorCount : int ref
11 val warningCount : int ref
12 val init : unit -> unit
13 val log : string -> unit
14 val fail : string -> 'a
15 val error : string -> unit
16 val errorPos : SourceMapping.location * string -> unit
17 val warning : string -> unit
18 val warningPos : SourceMapping.location * string -> unit
19 val withLoc : SourceMapping.location -> ('a -> 'b) -> 'a -> 'b
20 val status : unit -> string
21
22 (* attach error messages to a log file too *)
23 val printToLog : string -> unit
24 val openLogFile : string -> unit
25 val closeLogFile : unit -> unit
26 val logfile : unit -> string
27 end