summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-12-05 10:43:06 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2011-12-05 10:43:06 -0500
commit02f3311b6fd7af07e63b5a0df2598b148783fd61 (patch)
tree1ef7b83959a5e93a0265a1daf20c7848984a0b45
parentd1808f886236e02fa5de7bdfd3c956845eca7e8e (diff)
Treat [naughtyDebug] as pure for optimization purposes
-rw-r--r--src/settings.sml1
-rw-r--r--tests/naughty.ur12
2 files changed, 12 insertions, 1 deletions
diff --git a/src/settings.sml b/src/settings.sml
index 922638f5..02fd3c10 100644
--- a/src/settings.sml
+++ b/src/settings.sml
@@ -143,7 +143,6 @@ val benignBase = basis ["get_cookie",
"onServerError",
"kc",
"debug",
- "naughtyDebug",
"rand",
"now",
"getHeader",
diff --git a/tests/naughty.ur b/tests/naughty.ur
new file mode 100644
index 00000000..14919f84
--- /dev/null
+++ b/tests/naughty.ur
@@ -0,0 +1,12 @@
+fun main () : transaction page =
+ if naughtyDebug "hello" = 0 then
+ return <xml><body></body></xml>
+ else
+ error <xml>Uhoh!</xml>
+
+(*fun main () : transaction page =
+ let
+ val a = naughtyDebug ""
+ in
+ return <xml><body></body></xml>
+ end*)