diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-12-30 09:43:41 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-12-30 09:43:41 -0500 |
commit | 01ae2cbd82a1592d725bc6789c2afb7345b45ff1 (patch) | |
tree | 7b206994d25b737eb100ac0c890132982cb06d6a | |
parent | f60bcb83cf4d8e0a6176a1dca6e557c49e9f9375 (diff) |
Starting to implement source set
-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"), _)) => |