Is there a Monoid instance defined for IO () anywhere? I'm using the following,
instance Monoid (IO ()) where { mempty = pure mempty; mappend = (*>) }
This definition follows a general form mentioned in http://haskell.org/haskellwiki/TypeComposition,
instance (Applicative f, Monoid a) => Monoid (f a) where
mempty = pure mempty
mappend = (*>)
without the conflicts (overlapping instances) introduced by this definition.
- Conal