Open chshersh opened 6 years ago
This seems more of a GHC issue than a ghc-typelits-knownnat
issue, because for both GHC 8.2 and GHC 8.4 ghc-typelits-knownnat
solves the KnownNat (n+1)
constraint from the KnownNat n
constraint. The difference seems to be that in GHC 8.2 and earlier, GHC used the KnownNat (n+1)
constraint solved by ghc-typelits-knownnat
to solve the Typeable (n+1)
constraint, whereas in GHC 8.4 no longer does this.
@christiaanb Thanks for quick response! I discovered that there already was similar GHC issue but it's fixed:
Looks like it become broken again... I will open new issue in GHC.
UPDATE: Here is the issue:
I'm using
ghc-typelits-knownnat-0.5
. And I have the following code:This code produces the following error when compiling with GHC-8.4.3:
However, it compiles and works completely okay with GHC-8.2.2 and GHC-8.0.2. What should I do to make this code work with latest GHC version?