The free MonadPlus defined as
data Free f a = Pure a | Free (f (Free f a)) | Plus [Free f a]
was removed in free 4.6 with the foll
I believe that the representation itself was OK and that the lawfulness could have been remedied by changing these method signatures
iter :: Functor f => (f a -> a) -> ([a] -> a) -> Free f a -> a
iterM :: (Monad m, Functor f) => (f (m a) -> m a) -> ([m a] -> m a) -> Free f a -> m a
to
iter :: (Functor f, Monoid a) => (f a -> a) -> Free f a -> a
iterM :: (MonadPlus m, Functor f) => (f (m a) -> m a) -> Free f a -> m a
i.e.
Monoid a
instead of an arbitrary function [a] -> a
in iter
;MonadPlus m
instead of an arbitrary function [m a] -> m a
in iterM
.My guess is that it was removed (instead of fixed) just because it is not worth to keep around when FreeT f []
gives an equivalent representation.