Hacker News new | past | comments | ask | show | jobs | submit login

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.




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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: