diff options
author | Vladimir Azarov <avm@intermediate-node.net> | 2025-05-14 03:19:35 +0200 |
---|---|---|
committer | Vladimir Azarov <avm@intermediate-node.net> | 2025-05-14 03:19:35 +0200 |
commit | 3d568063a49204193009ad6a2637176b38902525 (patch) | |
tree | a29e144f61133c7cd505f3657ae4abf27b12f19f /exn_handler.fun | |
parent | 52a6f8656e8a600a2c59fa2802fb46fafb30de45 (diff) |
Printf
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 |