diff options
author | Adam Chlipala <adam@chlipala.net> | 2013-10-10 18:01:30 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2013-10-10 18:01:30 -0400 |
commit | 08bee251e9471ab1c1e634e85cd2e1c3830cd566 (patch) | |
tree | 36da11fa0eda62dae9ec1f9b6b2e759f28039265 /tests | |
parent | 8b2c97e6fe1a63cb59655d83c1411fe75d9505d4 (diff) |
Make transactional FFI functions effectful by default
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ffi_eff.urs | 2 | ||||
-rw-r--r-- | tests/ffieff.ur | 6 | ||||
-rw-r--r-- | tests/ffieff.urp | 6 |
3 files changed, 14 insertions, 0 deletions
diff --git a/tests/ffi_eff.urs b/tests/ffi_eff.urs new file mode 100644 index 00000000..150c4da3 --- /dev/null +++ b/tests/ffi_eff.urs @@ -0,0 +1,2 @@ +val shout : string -> transaction {} +val sneakyShout : string -> int diff --git a/tests/ffieff.ur b/tests/ffieff.ur new file mode 100644 index 00000000..a63fa4bc --- /dev/null +++ b/tests/ffieff.ur @@ -0,0 +1,6 @@ +open Ffi_eff + +fun main () : transaction page = return <xml><body> + <button value="shout" onclick={fn _ => shout "Hi!"; shout "Bye!"}/> + <button value="sneakyShout" onclick={fn _ => let val x = sneakyShout "Whoa" in return () end}/> +</body></xml> diff --git a/tests/ffieff.urp b/tests/ffieff.urp new file mode 100644 index 00000000..9f89cbc4 --- /dev/null +++ b/tests/ffieff.urp @@ -0,0 +1,6 @@ +ffi ffi_eff +jsFunc Ffi_eff.shout=alert +jsFunc Ffi_eff.sneakyShout=alert +rewrite all Ffieff/* + +ffieff |