Open augustss opened 6 years ago
The superfluous constraints in bug2
should be solved by moving the KnownNat2
instances defined in ghc-typelits-extra
for Div
and Mod
to the ghc-typelits-knownnat
package.
As a work-around, you can import GHC.TypeLits.Extra
for now, so that the KnownNat2
instances will be in scope.
I have yet to solve the other superfluous constraints; the inequality constraints in particular will take some time, because ghc-typelits-natnormalise
inequality solver is really crude, and can only handle solving wanted inequalities using a single given inequality at a time. And in order to solve the wanted inequalities in your example it'll have to use multiple given inequalities at a time. I'll have to see how far the current brute-force approach will get...
Some examples
Bug.hs.gz