Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
770:c125df6fabfc | 771:eac1974924bb |
---|---|
6 <button value="Remote" onclick={printer ()}/> | 6 <button value="Remote" onclick={printer ()}/> |
7 <button value="Local" onclick={Test.bar "Hoho"}/> | 7 <button value="Local" onclick={Test.bar "Hoho"}/> |
8 <button value="Either" onclick={Test.print}/> | 8 <button value="Either" onclick={Test.print}/> |
9 </body></xml> | 9 </body></xml> |
10 | 10 |
11 fun xact () = | |
12 Test.transactional; | |
13 return <xml><body> | |
14 All good. | |
15 </body></xml> | |
16 | |
17 fun xact2 () = | |
18 Test.transactional; | |
19 error <xml>Failure</xml>; | |
20 return <xml><body> | |
21 All gooder. | |
22 </body></xml> | |
23 | |
11 fun main () = return <xml><body> | 24 fun main () = return <xml><body> |
12 {[Test.out (Test.frob (Test.create "Hello ") "world!")]} | 25 {[Test.out (Test.frob (Test.create "Hello ") "world!")]} |
13 <form><submit action={effect}/></form> | 26 <form><submit action={effect}/></form> |
27 <form><submit action={xact}/></form> | |
28 <form><submit action={xact2}/></form> | |
14 </body></xml> | 29 </body></xml> |