Commit d73ecf29 authored by Ian Lynagh's avatar Ian Lynagh

Some DEBUG CPP removal

parent 611c2c3a
......@@ -791,9 +791,7 @@ mkStgRhs rhs_fvs srt binder_info rhs
then (if isNotTop toplev
then SingleEntry -- HA! Paydirt for "dem"
else
#ifdef DEBUG
trace "WARNING: SE CAFs unsupported, forcing UPD instead" $
#endif
(if debugIsOn then trace "WARNING: SE CAFs unsupported, forcing UPD instead" else id) $
Updatable)
else Updatable
-- For now we forbid SingleEntry CAFs; they tickle the
......
......@@ -39,9 +39,7 @@ module StgSyn (
pprStgBinding, pprStgBindings, pprStgBindingsWithSRTs
#ifdef DEBUG
, pprStgLVs
#endif
) where
#include "HsVersions.h"
......@@ -804,7 +802,6 @@ instance Outputable AltType where
\end{code}
\begin{code}
#ifdef DEBUG
pprStgLVs :: Outputable occ => GenStgLiveVars occ -> SDoc
pprStgLVs lvs
= getPprStyle $ \ sty ->
......@@ -812,7 +809,6 @@ pprStgLVs lvs
empty
else
hcat [text "{-lvs:", interpp'SP (uniqSetToList lvs), text "-}"]
#endif
\end{code}
\begin{code}
......
......@@ -531,17 +531,16 @@ zonkQuantifiedTyVar tv
-- It might be a skolem type variable,
-- for example from a user type signature
MetaTv _ _ref ->
#ifdef DEBUG
-- [Sept 04] Check for non-empty.
-- See note [Silly Type Synonym]
(readMutVar _ref >>= \cts ->
case cts of
Flexi -> return ()
Indirect ty -> WARN( True, ppr tv $$ ppr ty )
return ()) >>
#endif
skolemiseUnboundMetaTyVar tv vanillaSkolemTv
MetaTv _ ref ->
do when debugIsOn $ do
-- [Sept 04] Check for non-empty.
-- See note [Silly Type Synonym]
cts <- readMutVar ref
case cts of
Flexi -> return ()
Indirect ty -> WARN( True, ppr tv $$ ppr ty )
return ()
skolemiseUnboundMetaTyVar tv vanillaSkolemTv
_other -> pprPanic "zonkQuantifiedTyVar" (ppr tv) -- FlatSkol, RuntimeUnk
skolemiseUnboundMetaTyVar :: TcTyVar -> TcTyVarDetails -> TcM TyVar
......
......@@ -107,18 +107,16 @@ import MonadUtils
import VarSet
import Pair
import FastString
import StaticFlags
import Util
import HsBinds -- for TcEvBinds stuff
import Id
import TcRnTypes
import Data.IORef
import Control.Monad
import Data.IORef
import qualified Data.Map as Map
#ifdef DEBUG
import StaticFlags( opt_PprStyle_Debug )
import Control.Monad( when )
#endif
\end{code}
......@@ -585,12 +583,12 @@ runTcS context untouch tcs
; ty_binds <- TcM.readTcRef ty_binds_var
; mapM_ do_unification (varEnvElts ty_binds)
#ifdef DEBUG
; count <- TcM.readTcRef step_count
; when (opt_PprStyle_Debug && count > 0) $
TcM.debugDumpTcRn (ptext (sLit "Constraint solver steps =")
<+> int count <+> ppr context)
#endif
; when debugIsOn $ do {
count <- TcM.readTcRef step_count
; when (opt_PprStyle_Debug && count > 0) $
TcM.debugDumpTcRn (ptext (sLit "Constraint solver steps =")
<+> int count <+> ppr context)
}
-- And return
; ev_binds <- TcM.readTcRef evb_ref
; return (res, evBindMapBinds ev_binds) }
......@@ -727,12 +725,11 @@ setWantedTyBind tv ty
= do { ref <- getTcSTyBinds
; wrapTcS $
do { ty_binds <- TcM.readTcRef ref
#ifdef DEBUG
; TcM.checkErr (not (tv `elemVarEnv` ty_binds)) $
vcat [ text "TERRIBLE ERROR: double set of meta type variable"
, ppr tv <+> text ":=" <+> ppr ty
, text "Old value =" <+> ppr (lookupVarEnv_NF ty_binds tv)]
#endif
; when debugIsOn $
TcM.checkErr (not (tv `elemVarEnv` ty_binds)) $
vcat [ text "TERRIBLE ERROR: double set of meta type variable"
, ppr tv <+> text ":=" <+> ppr ty
, text "Old value =" <+> ppr (lookupVarEnv_NF ty_binds tv)]
; TcM.writeTcRef ref (extendVarEnv ty_binds tv (tv,ty)) } }
setIPBind :: EvVar -> EvTerm -> TcS ()
......
......@@ -1027,14 +1027,13 @@ evVarPred_maybe v = if isPredTy ty then Just ty else Nothing
where ty = varType v
evVarPred :: EvVar -> PredType
#ifdef DEBUG
evVarPred var
| debugIsOn
= case evVarPred_maybe var of
Just pred -> pred
Nothing -> pprPanic "tcEvVarPred" (ppr var <+> ppr (varType var))
#else
evVarPred = varType
#endif
| otherwise
= varType var
\end{code}
Superclasses
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment