3 ms·
Yes indeed. Not only is it possible to overload + but Haskell's type system has absolutely nothing to say on the matter.
by tome 9y ago
Yes indeed. Not only is it possible to overload + but Haskell's type system has absolutely nothing to say on the matter.
- Maro 9y agoYes but if you want to use libs, and they don't do it this way, you're f--ked. This is one of the things I ran into.
- dllthomas 9y agoWell, no, you're not "f--ked", there's just a pile of boilerplate. Not fun - and likely not worth it for the marginal benefit of being able to reuse + that way - but plenty possible. And for what it's worth, I certainly agree that the way Num is structured is a wart in Haskell, and I think the previous two commenters agree. It's just that we should be clear about where the blame lies - and that's not the type system.