summaryrefslogtreecommitdiff
path: root/tests/lessSafeFfi.ur
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lessSafeFfi.ur')
-rw-r--r--tests/lessSafeFfi.ur19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/lessSafeFfi.ur b/tests/lessSafeFfi.ur
new file mode 100644
index 00000000..da79bfdc
--- /dev/null
+++ b/tests/lessSafeFfi.ur
@@ -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>