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.Applicative

Description

Semigroups for working with `Applicative` `Functor`s.

Synopsis

- newtype Traversal f = Traversal {
  - getTraversal :: f ()
  }
- newtype Ap f m = Ap {
  - getApp :: f m
  }

# Documentation

newtype Traversal f Source

A `Traversal` uses an glues together `Applicative` actions with (*>) in the manner of `traverse_` from Data.Foldable. Any values returned by reduced actions are discarded.

Constructors

Traversal |

Fields

getTraversal :: f ()

Instances

Applicative f => Monoid (Traversal f) |
Applicative f => Semigroup (Traversal f) |
Applicative f => Reducer (f a) (Traversal f) |

newtype Ap f m Source

Constructors

Ap |

Fields

getApp :: f m

Instances

Functor f => Functor (Ap f) |
Applicative f => Applicative (Ap f) |
(Applicative f, Reducer c m) => Reducer (f c) (Ap f m) |
(Applicative f, Monoid m) => Monoid (Ap f m) |
(Applicative f, Semigroup m) => Semigroup (Ap f m) |