4 ms·
Yeah, in Haskell it's allowed but outputs a warning. So a lot of my modules use -fno-warn-orphans :D
by floatboth 9y ago
Yeah, in Haskell it's allowed but outputs a warning. So a lot of my modules use -fno-warn-orphans :D
- mrkgnao 9y agoThe reason is that class instances are really not first-class in Haskell. You can never import a module and choose not to import its instances, not even with import Module (just_one_symbol_i_need) or to not import a couple of them. I think named instances a la PureScript let you do import Module (instance toJsonText, ...) which would be great to have in Haskell, but probably breaks something deep inside instance resolution. PureScript as a "Haskell without the mistakes" really is a great idea.