From: Ian Lynagh Date: Sat, 10 May 2008 22:03:29 +0000 (+0000) Subject: Fix a warning when DEBUG is not on X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=26416bba9d0bfe0b10bfee9d01053cf507d2918b;ds=sidebyside Fix a warning when DEBUG is not on --- diff --git a/compiler/typecheck/Inst.lhs b/compiler/typecheck/Inst.lhs index 2170d4f..45e8d8d 100644 --- a/compiler/typecheck/Inst.lhs +++ b/compiler/typecheck/Inst.lhs @@ -758,9 +758,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'))) }