summaryrefslogtreecommitdiff
path: root/common.sml
diff options
context:
space:
mode:
authorVladimir Azarov <avm@intermediate-node.net>2025-08-04 00:11:18 +0200
committerVladimir Azarov <avm@intermediate-node.net>2025-08-04 00:11:18 +0200
commit2f168e6c941662d9a3b4c0e5440f9f4cdf0bb710 (patch)
treeff0546dca084feb70397aa8fc882200cb4ee1c96 /common.sml
parenta797a8e36be4506508b053ce7357766199368daa (diff)
Typedef support
Diffstat (limited to 'common.sml')
-rw-r--r--common.sml8
1 files changed, 8 insertions, 0 deletions
diff --git a/common.sml b/common.sml
index 6b23c4d..4bde818 100644
--- a/common.sml
+++ b/common.sml
@@ -194,3 +194,11 @@ let
in
printf `"error: " (fn (a, _) => g (a, finish))
end
+
+fun printfn g =
+let
+ fun finish (true, _) = ()
+ | finish (false, (output, _)) = output "\n"
+in
+ printf (fn (a, _) => g (a, finish))
+end