-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nat
(in)equality transitivity or congruence regression in GHC 9.8.1-alpha1: Cannot satisfy: OS.Rank sh2 <= 1 + OS.Rank sh1
#75
Comments
So on GHC 9.6.2 the plugin sees the following constraints:
but on GHC 9.8.2-alpha1 the plugin sees the following constraints:
The problem is that the plugin cannot currently substitute |
Maybe we should take a new look at clash-lang/ghc-typelits-knownnat#43 or something like it since we no longer get the flat constraints. |
Sadly, we need something more than tyvar substitutions. In the above case we need to substitute |
Yes I think maybe we should introduce flattening tyvars locally. |
But this has nothing to do with (un)flattening! Because none of the equalities have a tyvar on the LHS or RHS. We have a TyFam app on the LHS and a TyFam app on the RHS. |
I'm saying that we should add tyvars(Our own version of flattening skolems) so we recover |
This ticket is moved here from https://gitlab.haskell.org/ghc/ghc/-/issues/23763.
Repro with GHC 9.8.1-alpha1 and head.hackage (http://ghc.gitlab.haskell.org/head.hackage/):
clone Mikolaj/horde-ad@e76ff6c
cabal build
you get
It works fine with GHC <= 9.6 and also after patching it in the following way:
Mikolaj/horde-ad@0417f41
My guess is that previously GHC could deduce:
from (note that
sh2
that GHC invents here in justzsuccPerm
-- this obfuscation in error messages is already reported in one of my older tickets)and
but now it can't.
The issue may be in GHC itself or in how plugin
GHC.TypeLits.Normalise
has been updated to 9.8.1-alpha1, but I doubt the latter, because it's been updated on head.hackage by people that know what they are doing.I have now tried with HEADs of the github repos of
GHC.TypeLits.Normalise
and the other plugins and with GHC 9.8.1-alpha1 and the results are the same as with the versions of the plugins from head.hackage.The text was updated successfully, but these errors were encountered: