
8 Mar
2007
8 Mar
'07
11:57 p.m.
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
6696
Age (days ago)
6696
Last active (days ago)
0 comments
1 participants
participants (1)
-
Conal Elliott