summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core/Lint.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/Core/Lint.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/Core/Lint.hs')
-rw-r--r--compiler/GHC/Core/Lint.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Core/Lint.hs b/compiler/GHC/Core/Lint.hs
index 6dc84b91ab..e7be00096a 100644
--- a/compiler/GHC/Core/Lint.hs
+++ b/compiler/GHC/Core/Lint.hs
@@ -2472,7 +2472,7 @@ compatible_branches (CoAxBranch { cab_tvs = tvs1
lhs2' = substTys subst lhs2
rhs2' = substTy subst rhs2
in
- case tcUnifyTys (const BindMe) lhs1 lhs2' of
+ case tcUnifyTys alwaysBindFun lhs1 lhs2' of
Just unifying_subst -> substTy unifying_subst rhs1 `eqType`
substTy unifying_subst rhs2'
Nothing -> True