summaryrefslogtreecommitdiff
path: root/tests/rpcNested.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-08-21 10:55:31 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2011-08-21 10:55:31 -0400
commit73ec19ef86ac9aca7f2b710cd29c9107ff7d5914 (patch)
tree0838befdc51675455f8e33e979e23dcfaf06eeb5 /tests/rpcNested.ur
parent6c0db0f815b3b5b37a359b5a76c11000db700c5a (diff)
Add prototypes for [un]urlification functions
Diffstat (limited to 'tests/rpcNested.ur')
-rw-r--r--tests/rpcNested.ur16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/rpcNested.ur b/tests/rpcNested.ur
new file mode 100644
index 00000000..4d8923bb
--- /dev/null
+++ b/tests/rpcNested.ur
@@ -0,0 +1,16 @@
+datatype node
+ = Node of
+ { Label : string
+ , SubForest : list node
+ }
+
+fun getNode () : transaction node =
+ return (Node { Label = "foo", SubForest = [] })
+
+fun main () : transaction page = return <xml><body>
+ <button onclick={
+ n <- rpc (getNode ());
+ case n of
+ Node {Label = l, ...} => alert ("l = " ^ l)
+ }/>
+ </body></xml>