summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core/Coercion
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/Coercion
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/Coercion')
-rw-r--r--compiler/GHC/Core/Coercion/Opt.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Core/Coercion/Opt.hs b/compiler/GHC/Core/Coercion/Opt.hs
index 108154e1c6..4353676af6 100644
--- a/compiler/GHC/Core/Coercion/Opt.hs
+++ b/compiler/GHC/Core/Coercion/Opt.hs
@@ -1005,7 +1005,7 @@ checkAxInstCo (AxiomInstCo ax ind cos)
check_no_conflict _ [] = Nothing
check_no_conflict flat (b@CoAxBranch { cab_lhs = lhs_incomp } : rest)
-- See Note [Apartness] in GHC.Core.FamInstEnv
- | SurelyApart <- tcUnifyTysFG (const BindMe) flat lhs_incomp
+ | SurelyApart <- tcUnifyTysFG alwaysBindFun flat lhs_incomp
= check_no_conflict flat rest
| otherwise
= Just b