summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2019-02-15 09:52:53 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-02-23 21:31:47 -0500
commitac34e784775a0fa8b7284d42ff89571907afdc36 (patch)
tree93a72750e3d1bd412ac8924d75d3087ef0095c38
parent2e9426df902cd2e118f162876d6991ffa5be9137 (diff)
downloadhaskell-ac34e784775a0fa8b7284d42ff89571907afdc36.tar.gz
Remove bogus assertion
Remove a bogus assertion in FamInst.newFamInst (There is a comment to explain.) This fixes Trac #16112.
-rw-r--r--compiler/typecheck/FamInst.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/typecheck/FamInst.hs b/compiler/typecheck/FamInst.hs
index aec8e4153f..7efcb971a9 100644
--- a/compiler/typecheck/FamInst.hs
+++ b/compiler/typecheck/FamInst.hs
@@ -158,8 +158,10 @@ newFamInst :: FamFlavor -> CoAxiom Unbranched -> TcM FamInst
-- Freshen the type variables of the FamInst branches
newFamInst flavor axiom@(CoAxiom { co_ax_tc = fam_tc })
= ASSERT2( tyCoVarsOfTypes lhs `subVarSet` tcv_set, text "lhs" <+> pp_ax )
- ASSERT2( tyCoVarsOfType rhs `subVarSet` tcv_set, text "rhs" <+> pp_ax )
ASSERT2( lhs_kind `eqType` rhs_kind, text "kind" <+> pp_ax $$ ppr lhs_kind $$ ppr rhs_kind )
+ -- We used to have an assertion that the tyvars of the RHS were bound
+ -- by tcv_set, but in error situations like F Int = a that isn't
+ -- true; a later check in checkValidFamInst rejects it
do { (subst, tvs') <- freshenTyVarBndrs tvs
; (subst, cvs') <- freshenCoVarBndrsX subst cvs
; dflags <- getDynFlags