Mercurial > urweb
view tests/rpcDO.ur @ 1184:d6f0e972b706
Re-add accidentally-removed parsing case for 'effectful'
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 09 Mar 2010 18:43:29 -0500 |
parents | 9da62680adc5 |
children |
line wrap: on
line source
datatype list t = Nil | Cons of t * list t table t : {A : int} fun main () : transaction page = let fun rows () = query (SELECT * FROM t) (fn r ls => return (Cons (r.T.A, ls))) Nil fun show ls = case ls of Nil => <xml/> | Cons (x, ls') => <xml>{[x]}<br/>{show ls'}</xml> in s <- source Nil; return <xml><body> <button value="Get It On!" onclick={ls <- rows (); set s ls}/><br/> <br/> Current: <dyn signal={ls <- signal s; return (show ls)}/> </body></xml> end