diff options
-rw-r--r-- | lib/basis.urs | 1 | ||||
-rw-r--r-- | src/monoize.sml | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/basis.urs b/lib/basis.urs index a61bf3ce..dddc8bde 100644 --- a/lib/basis.urs +++ b/lib/basis.urs @@ -85,6 +85,7 @@ val transaction_monad : monad transaction con source :: Type -> Type val source : t ::: Type -> t -> transaction (source t) +val set : t ::: Type -> source t -> t -> transaction unit con signal :: Type -> Type val signal_monad : monad signal diff --git a/src/monoize.sml b/src/monoize.sml index d3d20e7c..e34ef162 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -979,6 +979,19 @@ fun monoExp (env, st, fm) (all as (e, loc)) = loc), fm) end + | L.ECApp ((L.EFfi ("Basis", "set"), _), t) => + let + val t = monoType env t + in + ((L'.EAbs ("src", (L'.TFfi ("Basis", "int"), loc), + (L'.TFun (t, (L'.TFun ((L'.TRecord [], loc), (L'.TRecord [], loc)), loc)), loc), + (L'.EAbs ("v", t, (L'.TFun ((L'.TRecord [], loc), (L'.TRecord [], loc)), loc), + (L'.EAbs ("_", (L'.TRecord [], loc), (L'.TRecord [], loc), + (L'.EFfiApp ("Basis", "set_client_source", + [(L'.ERel 2, loc), (L'.ERel 1, loc)]), + loc)), loc)), loc)), loc), + fm) + end | L.EApp ((L.ECApp ((L.ECApp ((L.EFfi ("Basis", "return"), _), _), _), t), _), (L.EFfi ("Basis", "signal_monad"), _)) => |