Debian Codegraph @

lib/mlrisc-lib/MLRISC/control/mlriscErrormsg.sml

raw
1 (* mlriscErrormsg.sml
2 *
3 * COPYRIGHT (c) 2002 Bell Labs, Lucent Technologies
4 *)
5
6 signature MLRISC_ERROR_MSG =
7 sig
8 exception Error
9 val print : string -> unit
10 val impossible : string -> 'a
11 val error : string * string -> 'a
12 end
13
14 structure MLRiscErrorMsg : MLRISC_ERROR_MSG =
15 struct
16 exception Error
17 val print = fn s => TextIO.output(TextIO.stdOut, s)
18 fun impossible msg =
19 (app print ["Error: MLRisc bug: ",msg,"\n"];
20 TextIO.flushOut TextIO.stdOut;
21 raise Error)
22 fun error(module,msg) = impossible(module^"."^msg)
23 end
24
25