title: Haskell - Is there a way to use two monads that derive from the same class interchangeably?
body: <p>I have two monads that are very similar (they actually have the same name, but are not perfectly identical) and derive from the same class type. Unfortunately these monads are defined in different libraries and don't know about each other. When I try to use MonadB in LibraryA as a function context, I'm getting an error that it's expecting MonadA, understandably so. Is there any way to polymorphically use MonadB within LibraryA without linking the two libraries together, perhaps by using their general class type as a context instead?</p>