Gabriel439/Haskell-MMorph-Library — pull request #1 by duairc (2013-09-30 16:06:58+00:00)
Title: Added MInvariant, for invariant functors in the category of monads.

Hi Gabriel,

I wonder would I be able to persuade you to add the `MInvariant` class to your `mmorph` package? I've implemented it below. While some monad transformers can't be made an instance of `MFunctor`, every monad transformer (even `ContT` and similar) can be made an instance of `MInvariant`. Unfortunately this is a breaking change, because I have made `MInvariant` a superclass of `MFunctor`.

The reason I'm asking is because it would simplify the implementation of my `layers` package, which as it stands contains some overlap in functionality with `mmorph`. With this change I could simply depend on `mmorph` rather than reimplementing the wheel for this functionality.

If you are considering merging this patch, feel free to change any of the named I've chosen, and you might also want to update the documentation as well. At the moment I'm just trying to see if you would have any interest in this.

Thanks,
Shane