diff options
author | Richard Eisenberg <rae@richarde.dev> | 2021-01-05 22:40:53 -0500 |
---|---|---|
committer | Richard Eisenberg <rae@richarde.dev> | 2021-01-15 23:14:13 -0500 |
commit | 7d550ff71ee06c681756f60fbd3731559484afa3 (patch) | |
tree | eab8a083e327c06272f1c95833174ecf347bea45 /compiler/GHC/Tc/Utils/Unify.hs | |
parent | 0dba78410887ffc3d219639081e284ef7b67560a (diff) | |
download | haskell-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/Utils/Unify.hs')
-rw-r--r-- | compiler/GHC/Tc/Utils/Unify.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Tc/Utils/Unify.hs b/compiler/GHC/Tc/Utils/Unify.hs index 892ab050d5..6675e38d6b 100644 --- a/compiler/GHC/Tc/Utils/Unify.hs +++ b/compiler/GHC/Tc/Utils/Unify.hs @@ -1583,7 +1583,7 @@ Needless to say, all three have wrinkles: up a fresh gamma[n], and unify beta[k] := gamma[n]. * (TYVAR-TV) Unification variables. Suppose alpha[tyv,n] is a level-n - TyVarTv (see Note [Signature skolems] in GHC.Tc.Types.TcType)? Now + TyVarTv (see Note [TyVarTv] in GHC.Tc.Types.TcMType)? Now consider alpha[tyv,n] ~ Bool. We don't want to unify because that would break the TyVarTv invariant. |