diff options
author | Vladimir Azarov <avm@intermediate-node.net> | 2025-05-28 19:46:48 +0200 |
---|---|---|
committer | Vladimir Azarov <avm@intermediate-node.net> | 2025-05-28 19:46:48 +0200 |
commit | dce47d2de14608a20f5d0afeb9c6271fd203c9b1 (patch) | |
tree | ac4056cfd98bbdb707bcf32719cea92824f7d7ca /common.sml | |
parent | 3a32398248e5593b1b536c837478cab276f7aebf (diff) |
Declaration
Diffstat (limited to 'common.sml')
-rw-r--r-- | common.sml | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -179,6 +179,16 @@ type ('t1, 't2, 'a, 'b, 'c) a2printer = (bool * ((string -> unit) * 'a)) * 'b -> 't1 -> 't2 -> ((bool * ((string -> unit) * 'a)) * 'b -> 'c) -> 'c +val Popt = fn z => +let + fun f (out, p, v) = + case v of + NONE => Printf out `"none" % + | SOME v => Printf out p v % +in + bind A2 f +end z + fun die code g = let fun finish (true, _) = raise Unreachable |