diff options
-rw-r--r-- | src/mono_reduce.sml | 3 | ||||
-rw-r--r-- | tests/tooEager.ur | 18 |
2 files changed, 19 insertions, 2 deletions
diff --git a/src/mono_reduce.sml b/src/mono_reduce.sml index 5bcb6f57..c3c9da98 100644 --- a/src/mono_reduce.sml +++ b/src/mono_reduce.sml @@ -597,8 +597,7 @@ fun reduce' (file : file) = ((*Print.prefaces "trySub" [("e", MonoPrint.p_exp env (e, ErrorMsg.dummySpan))];*) case t of - (TFfi ("Basis", "string"), _) => doSub () - | (TSignal _, _) => e + (TSignal _, _) => e | _ => case e' of (ECase _, _) => e 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> |