summaryrefslogtreecommitdiff
path: root/tests/rpcNested.ur
blob: 4d8923bb074c2687737ce78ed905b0df4518ab43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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>