X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FInst.lhs;h=5089b8dba29a5935d858f473f6f90bc5cf667d80;hb=814d2f506d63f785dbfe33189dde606a06e60285;hp=2170d4ff7b3a2c888965cd1d47a8cbecf1c20f5a;hpb=dbe50b77059c7d55f909ba4c10ac03b8374f5b5e;p=ghc-hetmet.git diff --git a/compiler/typecheck/Inst.lhs b/compiler/typecheck/Inst.lhs index 2170d4f..5089b8d 100644 --- a/compiler/typecheck/Inst.lhs +++ b/compiler/typecheck/Inst.lhs @@ -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'))) }