From: simonpj@microsoft.com Date: Sat, 27 Oct 2007 15:54:33 +0000 (+0000) Subject: An implication constraint can abstract over EqInsts X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=0c11d889934ea6e5311f38f5d142aff9e22abb7f An implication constraint can abstract over EqInsts --- diff --git a/compiler/typecheck/Inst.lhs b/compiler/typecheck/Inst.lhs index 66e72e4..fac10ab 100644 --- a/compiler/typecheck/Inst.lhs +++ b/compiler/typecheck/Inst.lhs @@ -141,7 +141,7 @@ instType imp@(ImplicInst {}) = mkImplicTy (tci_tyvars imp) (tci_given imp) instType (EqInst {tci_left = ty1, tci_right = ty2}) = mkPredTy (EqPred ty1 ty2) mkImplicTy tvs givens wanteds -- The type of an implication constraint - = ASSERT( all isDict givens ) + = ASSERT( all isAbstractableInst givens ) -- pprTrace "mkImplicTy" (ppr givens) $ -- See [Equational Constraints in Implication Constraints] let dict_wanteds = filter (not . isEqInst) wanteds diff --git a/compiler/typecheck/TcRnTypes.lhs b/compiler/typecheck/TcRnTypes.lhs index 50199a7..9ecb943 100644 --- a/compiler/typecheck/TcRnTypes.lhs +++ b/compiler/typecheck/TcRnTypes.lhs @@ -661,7 +661,7 @@ data Inst -- Includes coercion variables -- mentioned in tci_reft tci_reft :: Refinement, - tci_given :: [Inst], -- Only Dicts + tci_given :: [Inst], -- Only Dicts and EqInsts -- (no Methods, LitInsts, ImplicInsts) tci_wanted :: [Inst], -- Only Dicts and ImplicInsts -- (no Methods or LitInsts)