Re:Strong Types and Their Impact on Testing
by michaelochurch on Tuesday November 18, 2014 @09:24PM
(#8627866)
(Different poster.) In fact, one of the beautiful things about Haskell is that the type system can (usually) infer exactly as much specificity as is needed.
The type of the literal "Num a => a" means that the literal "5" works for any type in the Num typeclass. So you can mix literals with any numeric type because the compiler will correctly infer the right type. You can even get usages like this:
[ Parent
| on HN ]
There are no comments on this comment yet.