Mercurial > urweb
annotate tests/lessSafeFfi.ur @ 2010:403f0cc65b9c
New lessSafeFfi
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Fri, 02 May 2014 19:19:09 -0400 |
parents | |
children | ec2c7a22df0d |
rev | line source |
---|---|
adam@2010 | 1 ffi foo : int -> int |
adam@2010 | 2 ffi bar serverOnly benignEffectful : int -> transaction unit |
adam@2010 | 3 ffi baz : transaction int |
adam@2010 | 4 |
adam@2010 | 5 ffi bup jsFunc "jsbup" : int -> transaction unit |
adam@2010 | 6 |
adam@2010 | 7 fun other () : transaction page = |
adam@2010 | 8 (*bar 17; |
adam@2010 | 9 q <- baz;*) |
adam@2010 | 10 return <xml><body> |
adam@2010 | 11 (*{[foo 42]}, {[q]}*) |
adam@2010 | 12 <button onclick={fn _ => bup 32}/> |
adam@2010 | 13 </body></xml> |
adam@2010 | 14 |
adam@2010 | 15 fun main () = return <xml><body> |
adam@2010 | 16 <form> |
adam@2010 | 17 <submit action={other}/> |
adam@2010 | 18 </form> |
adam@2010 | 19 </body></xml> |