summaryrefslogtreecommitdiff
path: root/tests/channel.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-03-22 16:03:45 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-03-22 16:03:45 -0400
commite2f6b11fd4fc806c5cdf88cf669ed5b2d9e34caf (patch)
treee2cac8cf9ae665630df1564c8942ad1d84484ac0 /tests/channel.ur
parentbac67ca0f668cd381205b243355da8c906c58b5b (diff)
Proper recv
Diffstat (limited to 'tests/channel.ur')
-rw-r--r--tests/channel.ur11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/channel.ur b/tests/channel.ur
index 6b98f5d7..df50ea27 100644
--- a/tests/channel.ur
+++ b/tests/channel.ur
@@ -1,10 +1,19 @@
fun main () : transaction page =
ch <- channel;
let
- fun onload () =
+ fun make () =
subscribe ch;
send ch "Hello world!"
+ fun echo () =
+ msg <- recv ch;
+ alert(msg);
+ echo ()
+
+ fun onload () =
+ make ();
+ echo ()
+
fun haveAnother () =
send ch "Here's another."
in