diff options
Diffstat (limited to 'tests/rpcNested.ur')
-rw-r--r-- | tests/rpcNested.ur | 16 |
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> |