
25 May
2010
25 May
'10
1:27 p.m.
I wrote:
-1 for the orphan Monad instance with the silly superclass constraint that this Applicative instance is meant to extend
Henning Thielemann wrote:
I assume you are referring to... defined in Control.Monad.Trans.Error from transformers or Control.Monad.Error from mtl.
Indeed.
I think the problem with this instance is that it is orphan.
That's one problem - and a serious one. The other problem is the superclass restriction. That only makes sense in the context of mtl or transformers. But the Either monad is far more generally useful than that. mtl should have defined a its own type instead of using up the Monad slot for the Prelude Either type. Regards, Yitz