summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2014-05-02 19:19:09 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2014-05-02 19:19:09 -0400
commit0c83e8f7c345a27be3cae77eeb2d7cb8658e5e9c (patch)
treebdccc17f7ec57e17465ac689d0f02d7b8c219a8b /tests
parent77b4d9b9397aefc41ae0c6465a75874c497d945c (diff)
New lessSafeFfi
Diffstat (limited to 'tests')
-rw-r--r--tests/lessSafeFfi.ur19
-rw-r--r--tests/lessSafeFfi.urp5
-rw-r--r--tests/lessSafeFfi.urs1
3 files changed, 25 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>
diff --git a/tests/lessSafeFfi.urp b/tests/lessSafeFfi.urp
new file mode 100644
index 00000000..729c5272
--- /dev/null
+++ b/tests/lessSafeFfi.urp
@@ -0,0 +1,5 @@
+rewrite all LessSafeFfi/*
+debug
+lessSafeFfi
+
+lessSafeFfi
diff --git a/tests/lessSafeFfi.urs b/tests/lessSafeFfi.urs
new file mode 100644
index 00000000..6ac44e0b
--- /dev/null
+++ b/tests/lessSafeFfi.urs
@@ -0,0 +1 @@
+val main : unit -> transaction page