
Thanks again for the detailed and explanatory answer. That's the reason I'm writing these huge responses, because I hope I can
shorten this journey for others.
This has certainly helped me grasp some aspects in this regard. While Monad Transformers are awesome and can solve many problems quite
easily, I'm pretty sure that there is almost always a nicer, "more functional" way to solve such a problem.
Incidentally, I happened to bump in to this paper, it claims they have found a way that allows us get rid of the need of monad transformers in a more systematic manner, by using what they call "Monad coproduct". The paper titled "Composing Monads Using Coproducts" is here. [1] I haven't understood it much till now, and it seems I will have to try real hard to read this paper. Ref. [1] http://isi.uni-bremen.de/~cxl/habil/papers/icfp02.pdf Thanks and regards, -Damodar Kulkarni