Hacker News new | ask | show | jobs
by nandemo 4806 days ago
Sounds like a bad idea to me. Even though Num doesn't have an explicit contract, we sort of expect it to behave "nicely".

But here we start with a nice ring like Integer and end up with a type that has this weird, extra element that has no inverse with respect to addition, etc.

1 comments

For all fixed length two's complement integer types the smallest representable number has no additive inverse, too.
Prelude Data.Int> minBound + minBound :: Int16

0

Ohhh yes, of course, it is still a abelian group.