summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Validity.hs
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@richarde.dev>2021-01-05 22:40:53 -0500
committerRichard Eisenberg <rae@richarde.dev>2021-01-15 23:14:13 -0500
commit7d550ff71ee06c681756f60fbd3731559484afa3 (patch)
treeeab8a083e327c06272f1c95833174ecf347bea45 /compiler/GHC/Tc/Validity.hs
parent0dba78410887ffc3d219639081e284ef7b67560a (diff)
downloadhaskell-wip/T19106.tar.gz
Make matchableGivens more reliably correct.wip/T19106
This has two fixes: 1. Take TyVarTvs into account in matchableGivens. This fixes #19106. 2. Don't allow unifying alpha ~ Maybe alpha. This fixes #19107. This patch also removes a redundant Note and redirects references to a better replacement. Also some refactoring/improvements around the BindFun in the pure unifier, which now can take the RHS type into account. Close #19106. Close #19107. Test case: partial-sigs/should_compile/T19106, typecheck/should_compile/T19107
Diffstat (limited to 'compiler/GHC/Tc/Validity.hs')
-rw-r--r--compiler/GHC/Tc/Validity.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Tc/Validity.hs b/compiler/GHC/Tc/Validity.hs
index ff6a89d02f..7a83bfc573 100644
--- a/compiler/GHC/Tc/Validity.hs
+++ b/compiler/GHC/Tc/Validity.hs
@@ -2452,8 +2452,8 @@ checkConsistentFamInst (InClsInst { ai_class = clas
-- The /scoped/ type variables from the class-instance header
-- should not be alpha-renamed. Inferred ones can be.
no_bind_set = mkVarSet inst_tvs
- bind_me tv | tv `elemVarSet` no_bind_set = Skolem
- | otherwise = BindMe
+ bind_me tv _ty | tv `elemVarSet` no_bind_set = Apart
+ | otherwise = BindMe
{- Note [Check type-family instance binders]