Mercurial > urweb
diff tests/cffi.ur @ 771:eac1974924bb
FFI transactionals
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 02 May 2009 18:41:21 -0400 |
parents | df09c95085f8 |
children |
line wrap: on
line diff
--- a/tests/cffi.ur Sat May 02 18:20:15 2009 -0400 +++ b/tests/cffi.ur Sat May 02 18:41:21 2009 -0400 @@ -8,7 +8,22 @@ <button value="Either" onclick={Test.print}/> </body></xml> +fun xact () = + Test.transactional; + return <xml><body> + All good. + </body></xml> + +fun xact2 () = + Test.transactional; + error <xml>Failure</xml>; + return <xml><body> + All gooder. + </body></xml> + fun main () = return <xml><body> {[Test.out (Test.frob (Test.create "Hello ") "world!")]} <form><submit action={effect}/></form> + <form><submit action={xact}/></form> + <form><submit action={xact2}/></form> </body></xml>