summaryrefslogtreecommitdiff
path: root/exn_handler.fun
diff options
context:
space:
mode:
authorVladimir Azarov <avm@intermediate-node.net>2025-05-14 03:19:35 +0200
committerVladimir Azarov <avm@intermediate-node.net>2025-05-14 03:19:35 +0200
commit3d568063a49204193009ad6a2637176b38902525 (patch)
treea29e144f61133c7cd505f3657ae4abf27b12f19f /exn_handler.fun
parent52a6f8656e8a600a2c59fa2802fb46fafb30de45 (diff)
Printf
Diffstat (limited to 'exn_handler.fun')
-rw-r--r--exn_handler.fun12
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