[commit: ghc] ghc-7.6: Fix missing case in coVarsOfTcCo (ef42189)
Paolo Capriotti
p.capriotti at gmail.com
Sat Sep 1 17:44:54 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : ghc-7.6
http://hackage.haskell.org/trac/ghc/changeset/ef4218994742e8400a48b4d6e1ae7e6b67650dc4
>---------------------------------------------------------------
commit ef4218994742e8400a48b4d6e1ae7e6b67650dc4
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Aug 22 16:13:56 2012 +0100
Fix missing case in coVarsOfTcCo
Reported by Ganesh, Trac #7178. Fix is easy.
MERGED from commit a0788a8b2ba19b7f3205010a71472342a75395f8
>---------------------------------------------------------------
compiler/typecheck/TcEvidence.lhs | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/compiler/typecheck/TcEvidence.lhs b/compiler/typecheck/TcEvidence.lhs
index 09704fb..76408bd 100644
--- a/compiler/typecheck/TcEvidence.lhs
+++ b/compiler/typecheck/TcEvidence.lhs
@@ -245,11 +245,9 @@ coVarsOfTcCo tc_co
go (TcLetCo {}) = emptyVarSet -- Harumph. This does legitimately happen in the call
-- to evVarsOfTerm in the DEBUG check of setEvBind
- -- We expect only coercion bindings
+ -- We expect only coercion bindings, so use evTermCoercion
go_bind :: EvBind -> VarSet
- go_bind (EvBind _ (EvCoercion co)) = go co
- go_bind (EvBind _ (EvId v)) = unitVarSet v
- go_bind other = pprPanic "coVarsOfTcCo:Bind" (ppr other)
+ go_bind (EvBind _ tm) = go (evTermCoercion tm)
get_bndrs :: Bag EvBind -> VarSet
get_bndrs = foldrBag (\ (EvBind b _) bs -> extendVarSet bs b) emptyVarSet
More information about the Cvs-ghc
mailing list