clash-lang / ghc-typelits-extra

Extra type-level operations on GHC.TypeLits.Nat and a custom solver
Other
16 stars 9 forks source link

Redunant instances in the type families Min, Max #10

Closed SkorikGG closed 7 years ago

SkorikGG commented 7 years ago

It is possible that such instances as Min x 0 = 0 are redundant, since now type Min (0-1) 0 reduce to 0.

christiaanb commented 7 years ago

The specific case is solved. It doesn't understand negative integers completely though, because we should only be dealing with natural numbers. That is:

test :: Proxy (Min (1-2) (0-1)) -> Proxy (3-4)
test = id

will still not compile.