The mtlx package

A monad transformer library with type indexes, which allows the
programmer to get a distinct copy of one of the monads without
reproducing definitions and instances. It currently
supports IdentityX, ReaderX, StateX, WriterX, RWSX, and ErrorX
monads (and their transformer versions). All these copies can be
combined into a transformer stack, including any of the original
mtl monads. Inspired by the original mtl. That library was
inspired by the paper /Functional Programming with Overloading and
Higher-Order Polymorphism/, by Mark P Jones
(http://web.cecs.pdx.edu/~mpj/pubs/springschool.html), Advanced
School of Functional Programming, 1995. See the Examples.hs file
for usage.