summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-03-29 16:44:20 +0000
committerIan Lynagh <igloo@earth.li>2008-03-29 16:44:20 +0000
commit4cf7988f740ee799bbdb0b6e653c096099378085 (patch)
tree1fe4016ef494a6a945d88e2d5b65cd42c408fc94 /compiler
parent9e5f0a0f6848dd8234a83d8ff514365aa4717eea (diff)
downloadhaskell-4cf7988f740ee799bbdb0b6e653c096099378085.tar.gz
DEBUG removal
Diffstat (limited to 'compiler')
-rw-r--r--compiler/typecheck/TcUnify.lhs20
1 files changed, 10 insertions, 10 deletions
diff --git a/compiler/typecheck/TcUnify.lhs b/compiler/typecheck/TcUnify.lhs
index e8365db1c7..4aa9b3d3c4 100644
--- a/compiler/typecheck/TcUnify.lhs
+++ b/compiler/typecheck/TcUnify.lhs
@@ -1488,17 +1488,17 @@ uMetaVar outer swapped tv1 BoxTv ref1 ps_ty2 non_var_ty2
--
-- It should not be the case that tv1 occurs in ty2
-- (i.e. no occurs check should be needed), but if perchance
- -- it does, the unbox operation will fill it, and the DEBUG
+ -- it does, the unbox operation will fill it, and the debug code
-- checks for that.
- do { final_ty <- unBox ps_ty2
-#ifdef DEBUG
- ; meta_details <- readMutVar ref1
- ; case meta_details of
- Indirect ty -> WARN( True, ppr tv1 <+> ppr ty )
- return () -- This really should *not* happen
- Flexi -> return ()
-#endif
- ; checkUpdateMeta swapped tv1 ref1 final_ty
+ do { final_ty <- unBox ps_ty2
+ ; when debugIsOn $ do
+ { meta_details <- readMutVar ref1
+ ; case meta_details of
+ Indirect ty -> WARN( True, ppr tv1 <+> ppr ty )
+ return () -- This really should *not* happen
+ Flexi -> return ()
+ }
+ ; checkUpdateMeta swapped tv1 ref1 final_ty
; return IdCo
}