
31 May
2011
31 May
'11
1:54 a.m.
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 ...