-
Notifications
You must be signed in to change notification settings - Fork 10
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
Intermediate type variable stops derivation of KnownNat
constraint
#42
Comments
I added some logging and the problem is that the substitutions generated from the givens don't lead to the required form.
This is because a substitution is not what would be required. We have substitutions:
But we would need Considering this doesn't go wrong anywhere else I'm not sure why this is happening. If this is limitation of the substitution list we need to make some kind of term rewriting function using the substitutions list as the input and continually rewriting until we get a normal form. Naively this is problematic because rewrites are bidirectional and can form loops. Pinging @christiaanb |
See the https://github.com/clash-lang/ghc-typelits-knownnat/tree/fix-42 branch for the additional logging and new test. |
Occurs after partially fixing #65 reported in the natnormalise plugin by @lmbollen.
This test:
Fails with:
Even though it should be able to derive the
KnownNat
constraint from theKnownNat a
given constraint.The text was updated successfully, but these errors were encountered: