Remove redundant imports from Inst
[ghc-hetmet.git] / compiler / typecheck / Inst.lhs
index 2170d4f..5089b8d 100644 (file)
@@ -69,11 +69,9 @@ import Module
 import Coercion
 import HscTypes
 import CoreFVs
-import DataCon
 import Id
 import Name
 import NameSet
-import Literal
 import Var      ( Var, TyVar )
 import qualified Var
 import VarEnv
@@ -89,8 +87,6 @@ import Util
 import Unique
 import Outputable
 import Data.List
-import TypeRep
-import Class
 
 import Control.Monad
 \end{code}
@@ -758,9 +754,7 @@ lookupSimpleInst (Method {tci_oid = id, tci_tys = tys, tci_theta = theta, tci_lo
 lookupSimpleInst (LitInst { tci_lit = lit@OverLit { ol_val = lit_val
                                                  , ol_rebindable = rebindable }
                          , tci_ty = ty, tci_loc = iloc})
-#ifdef DEBUG
-  | rebindable = panic "lookupSimpleInst"              -- A LitInst invariant
-#endif
+  | debugIsOn && rebindable = panic "lookupSimpleInst" -- A LitInst invariant
   | Just witness <- shortCutLit lit_val ty
   = do { let lit' = lit { ol_witness = witness, ol_type = ty }
        ; return (GenInst [] (L loc (HsOverLit lit'))) }