Add Monoid instance for IO
This is to add the following Monoid
instance for IO
:
instance Monoid a => Monoid (IO a) where
mempty = pure mempty
mappend = liftA2 mappend
I originally proposed this instance on the libraries mailing list a while ago:
https://mail.haskell.org/pipermail/libraries/2014-November/024310.html
- .. and the proposal was well-received so I would like to contribute the instance.
Trac metadata
Trac field | Value |
---|---|
Version | 7.10.1 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |