Mercurial > urweb
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/lessSafeFfi.ur Fri May 02 19:19:09 2014 -0400 @@ -0,0 +1,19 @@ +ffi foo : int -> int +ffi bar serverOnly benignEffectful : int -> transaction unit +ffi baz : transaction int + +ffi bup jsFunc "jsbup" : int -> transaction unit + +fun other () : transaction page = + (*bar 17; + q <- baz;*) + return <xml><body> + (*{[foo 42]}, {[q]}*) + <button onclick={fn _ => bup 32}/> + </body></xml> + +fun main () = return <xml><body> + <form> + <submit action={other}/> + </form> +</body></xml>