Mercurial > urweb
annotate tests/goback.ur @ 1855:0480b8f29a47
Undo 'let' inlining tweak; improve optimization of 'case' of type 'transaction'
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Fri, 07 Jun 2013 16:11:52 -0400 |
parents | c3b5cf5c2f98 |
children |
rev | line source |
---|---|
adam@1552 | 1 table channels : { Channel : channel {} } |
adam@1552 | 2 |
adam@1552 | 3 fun get () = |
adam@1552 | 4 ch <- channel; |
adam@1552 | 5 dml (INSERT INTO channels (Channel) VALUES ({[ch]})); |
adam@1552 | 6 return <xml><body onload={recv ch}> |
adam@1552 | 7 Hi. |
adam@1552 | 8 </body></xml> |
adam@1552 | 9 |
adam@1552 | 10 fun post () = |
adam@1552 | 11 ch <- channel; |
adam@1552 | 12 dml (INSERT INTO channels (Channel) VALUES ({[ch]})); |
adam@1552 | 13 return <xml><body onload={recv ch}> |
adam@1552 | 14 Hi! |
adam@1552 | 15 </body></xml> |
adam@1552 | 16 |
adam@1552 | 17 fun main () = return <xml><body> |
adam@1552 | 18 <li><a link={get ()}>Get</a></li> |
adam@1552 | 19 <li><form><submit action={post}/></form></li> |
adam@1552 | 20 </body></xml> |