Closed ursi closed 3 years ago
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 (listens
and censor
) and neither of them have an additional Semigroup or Monoid constraint. So :+1: from me. Thanks!
oopsie daisy, I added superclasses, not subclasses. I think I was confused when I made this PR (<=
while being an arrow, can also be interpreted as less-than-or-equal-to)
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.
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.