diff options
Diffstat (limited to 'exn_handler.fun')
-rw-r--r-- | exn_handler.fun | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/exn_handler.fun b/exn_handler.fun index 2d970cc..b95e847 100644 --- a/exn_handler.fun +++ b/exn_handler.fun @@ -2,7 +2,7 @@ functor ExnHandler(structure T: TOKENIZER; structure P: PPC): EXN_HANDLER = struct - fun eprint s = printLn $ "error: " ^ s + fun eprint s = printf `"error: " `s % fun otherExn e = let @@ -10,10 +10,10 @@ struct in eprint $ "exception " ^ exnMessage e ^ " was raised"; if hist = [] then - (printLn "No stack trace is avaliable"; - printLn "Recompile with -const \"Exn.keepHistory true\"") + (output "No stack trace is avaliable\n"; + output "Recompile with -const \"Exn.keepHistory true\"\n") else - List.app (fn x => printLn $ "\t" ^ x) hist + List.app (fn x => printf `"\t" `x `"\n" %) hist end fun exit code = Posix.Process.exit $ Word8.fromInt code @@ -26,9 +26,9 @@ struct OS.SysErr (str, _) => str | _ => exnMessage cause in - printLn $ prefix ^ reason + printf `prefix `reason `"\n" % end - | ioExn _ = (printLn "ioExn: unreachable"; exit 254) + | ioExn _ = (output "ioExn: unreachable\n"; exit 254) fun handler e = (case e of |