Two improvements to boxy matching
[ghc-hetmet.git] / compiler / typecheck / TcMType.lhs
index 4cd966f..fc434d8 100644 (file)
@@ -88,6 +88,7 @@ import ListSetOps
 import UniqSupply
 import SrcLoc
 import Outputable
+import FastString
 
 import Control.Monad   ( when, unless )
 import Data.List       ( (\\) )
@@ -506,14 +507,12 @@ isFilledMetaTyVar tv
   | otherwise = return False
 
 writeMetaTyVar :: TcTyVar -> TcType -> TcM ()
-#ifndef DEBUG
-writeMetaTyVar tyvar ty = writeMutVar (metaTvRef tyvar) (Indirect ty)
-#else
+writeMetaTyVar tyvar ty
+  | not debugIsOn = writeMutVar (metaTvRef tyvar) (Indirect ty)
 writeMetaTyVar tyvar ty
   | not (isMetaTyVar tyvar)
   = pprTrace "writeMetaTyVar" (ppr tyvar) $
     return ()
-
   | otherwise
   = ASSERT( isMetaTyVar tyvar )
     -- TOM: It should also work for coercions
@@ -523,7 +522,6 @@ writeMetaTyVar tyvar ty
   where
     k1 = tyVarKind tyvar
     k2 = typeKind ty
-#endif
 \end{code}