# HG changeset patch # User Adam Chlipala # Date 1230648221 18000 # Node ID 9f02f17651490900d1eeecf68f6943971536cd89 # Parent ac947e2f29ff6a6f10494f8532b16a0ea518cc8a Starting to implement source set diff -r ac947e2f29ff -r 9f02f1765149 lib/basis.urs --- a/lib/basis.urs Sun Dec 21 12:56:39 2008 -0500 +++ b/lib/basis.urs Tue Dec 30 09:43:41 2008 -0500 @@ -85,6 +85,7 @@ 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 -r ac947e2f29ff -r 9f02f1765149 src/monoize.sml --- a/src/monoize.sml Sun Dec 21 12:56:39 2008 -0500 +++ b/src/monoize.sml Tue Dec 30 09:43:41 2008 -0500 @@ -979,6 +979,19 @@ 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"), _)) =>