From 0c11d889934ea6e5311f38f5d142aff9e22abb7f Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Sat, 27 Oct 2007 15:54:33 +0000 Subject: [PATCH] An implication constraint can abstract over EqInsts --- compiler/typecheck/Inst.lhs | 2 +- compiler/typecheck/TcRnTypes.lhs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) -- 1.7.10.4