From dce47d2de14608a20f5d0afeb9c6271fd203c9b1 Mon Sep 17 00:00:00 2001 From: Vladimir Azarov Date: Wed, 28 May 2025 19:46:48 +0200 Subject: Declaration --- common.sml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'common.sml') diff --git a/common.sml b/common.sml index e648203..d039471 100644 --- a/common.sml +++ b/common.sml @@ -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 -- cgit v1.2.3