comparison tests/rpcNested.ur @ 1546:133c71008bef

Add prototypes for [un]urlification functions
author Adam Chlipala <adam@chlipala.net>
date Sun, 21 Aug 2011 10:55:31 -0400
parents
children
comparison
equal deleted inserted replaced
1545:5f530f8e3511 1546:133c71008bef
1 datatype node
2 = Node of
3 { Label : string
4 , SubForest : list node
5 }
6
7 fun getNode () : transaction node =
8 return (Node { Label = "foo", SubForest = [] })
9
10 fun main () : transaction page = return <xml><body>
11 <button onclick={
12 n <- rpc (getNode ());
13 case n of
14 Node {Label = l, ...} => alert ("l = " ^ l)
15 }/>
16 </body></xml>