ghc-typelits-natnormalise icon indicating copy to clipboard operation
ghc-typelits-natnormalise copied to clipboard

Could not deduce n~0 from the context n<=0

Open int-index opened this issue 4 years ago • 4 comments

Since we're dealing with natural numbers, which are by definition non-negative, we must be able to conclude n~0 from n<=0. However, the following code does not compile:

natLeqZero :: (n <= 0) => n :~: 0
natLeqZero = Refl

int-index avatar Jan 29 '20 12:01 int-index