summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2019-10-13 14:50:16 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2019-10-13 14:50:16 -0400
commit404429ca9197a508efc1be5425d6fc4a00a5eae9 (patch)
tree88cfeb8b5334e0cb9bf9a7b991eeb741dfc9e9ee /tests
parentb71c7b9ec4580326772a212fbe011322ae1ac063 (diff)
Undo a questionable optimization, almost 10 years later (closes #179)
Diffstat (limited to 'tests')
-rw-r--r--tests/tooEager.ur18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/tooEager.ur b/tests/tooEager.ur
new file mode 100644
index 00000000..c84a6d6c
--- /dev/null
+++ b/tests/tooEager.ur
@@ -0,0 +1,18 @@
+fun test (i: list int) : transaction unit =
+ a <- return (Some "abc");
+ c <- (case a of
+ None => return "1"
+ | Some b =>
+ debug "not happening :(";
+ return "2"
+ );
+ (case i of
+ [] => return ()
+ | first :: _ => debug c)
+
+fun main (): transaction page =
+ return <xml>
+ <body>
+ <button onclick={fn _ => rpc (test [])}>click</button>
+ </body>
+ </xml>