3 ms·
Another problem with newtypes, different from joppy's, is that they don't solve the problems with generic implementations. For example, define some `instance O
by marcosdumay 5y ago
Another problem with newtypes, different from joppy's, is that they don't solve the problems with generic implementations.
For example, define some `instance Ord a => SomeClass a`, or more interestingly, `instance (SomeClass m, MonadTrans n) => SomeClass (n m)` without much problem, but if you do that, you almost certainly can not define any other generic instance for that class, and nothing you can do with newtypes will save you.