diff tests/naughty.ur @ 1633:deeeb036c8ed

Treat [naughtyDebug] as pure for optimization purposes
author Adam Chlipala <adam@chlipala.net>
date Mon, 05 Dec 2011 10:43:06 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/naughty.ur	Mon Dec 05 10:43:06 2011 -0500
@@ -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*)