Add subclasses to enforce the type class laws#126
Add subclasses to enforce the type class laws#126hdgarrood merged 1 commit intopurescript:masterfrom
Conversation
|
I’m hesitant about this one, because we are now carrying extra dictionaries around which we weren’t before. At the very least this should allow us to relax some constraints elsewhere, in instances for these classes. |
|
Sorry, that’s not quite right - instances will likely still need the same constraints. I was thinking that there may now be redundant constraints on functions which use MonadTell or MonadWriter generically, but we only have two of those ( |
|
oopsie daisy, I added superclasses, not subclasses. I think I was confused when I made this PR ( Edit: actually I don't even know what to call it, since it's a type class constraint on one of the two types in the type class. |
|
Haha, so you did! I didn't realise until just now either. |
|
I think superclasses is still accurate - it's a relationship between the classes themselves, not the type parameters. |
|
I'm willing to redo the commit and submit another PR if you'd like it to be named appropriately. |
|
I wouldn't worry about it. We'd need to rewrite the history, which is a much bigger no-no in my mind. |
No description provided.