instance (Monad m, MonadPlus m) => Monoid (Stream m a) where > mempty = Chunks mempty > mappend (Chunks xs) (Chunks ys) = Chunks (xs `mappend` ys) > mappend _ _ = EOF > > > Iteratee.hs:28:25: > No instance for (Monoid (m a)) > arising from a use of `mempty' >
There is a clue in the first part of the error message. Add the required instance as part of the predicate: instance (Monad m, MonadPlus m, Monoid (m a)) => Monoid (Stream m a) where ...
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
