reducers-3.10.1.1: Semigroups, specialized containers and a general map/reduce framework

Portability | non-portable (MPTCs)
Stability | experimental
Maintainer | ekmett@gmail.com
Safe Haskell | Trustworthy

Data.Semigroup.Monad

Description

Semigroups for working with `Monad`s.

Synopsis

- newtype Action f = Action {
  - getAction :: f ()
  }
- newtype Mon f m = Mon {
  - getMon :: f m
  }

# Documentation

newtype Action f Source

A `Action` uses an glues together monadic actions with (>>) in the manner of `mapM_` from Data.Foldable. Any values returned by reduced actions are discarded.

Constructors

Action |

Fields

getAction :: f ()

Instances

Monad f => Monoid (Action f) |
Monad f => Semigroup (Action f) |
Monad f => Reducer (f a) (Action f) |

newtype Mon f m Source

Constructors

Mon |

Fields

getMon :: f m

Instances

Monad f => Monad (Mon f) |
(Monad f, Reducer c m) => Reducer (f c) (Mon f m) |
(Monad f, Monoid m) => Monoid (Mon f m) |
(Monad f, Semigroup m) => Semigroup (Mon f m) |