summaryrefslogtreecommitdiff
path: root/tests
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
commit1e022eb78e7ca3fd15634e3845756b9c14209cf3 (patch)
tree0838befdc51675455f8e33e979e23dcfaf06eeb5 /tests
parentf1096b0e7bd380e9ccfb1438548596fe9e9ab5e9 (diff)
Add prototypes for [un]urlification functions
Diffstat (limited to 'tests')
-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>