monoids-0.1.20: Monoids, specialized containers and a general map/reduce frameworkSource codeContentsIndex
Data.Monoid.Applicative
Portabilitynon-portable (MPTCs)
Stabilityexperimental
Maintainerekmett@gmail.com
Description
Monoids for working with an Applicative Functor.
Synopsis
module Data.Monoid.Reducer
module Data.Ring.Semi.Near
module Data.Ring.Module
newtype Traversal f = Traversal {
getTraversal :: f ()
}
newtype Alt f a = Alt {
getAlt :: f a
}
newtype App f m = App {
getApp :: f m
}
snocTraversal :: Reducer (f ()) (Traversal f) => Traversal f -> f () -> Traversal f
Documentation
module Data.Monoid.Reducer
module Data.Ring.Semi.Near
module Data.Ring.Module
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
getTraversal :: f ()
show/hide Instances
newtype Alt f a Source
A Alt turns any Alternative instance into a Monoid. It also provides a Multiplicative instance for an Applicative functor wrapped around a Monoid and asserts that any Alternative applied to a Monoid forms a LeftSemiNearRing under these operations.
Constructors
Alt
getAlt :: f a
show/hide Instances
Alternative f => Module Natural (Alt f a)
Alternative f => RightModule Natural (Alt f a)
Alternative f => LeftModule Natural (Alt f a)
Functor f => Functor (Alt f)
Applicative f => Applicative (Alt f)
Alternative f => Alternative (Alt f)
Applicative f => Pointed (Alt f)
Copointed f => Copointed (Alt f)
Alternative f => Reducer (f a) (Alt f a)
Eq (f a) => Eq (Alt f a)
Ord (f a) => Ord (Alt f a)
Read (f a) => Read (Alt f a)
Show (f a) => Show (Alt f a)
Alternative f => Monoid (Alt f a)
(Applicative f, Monoid a) => Multiplicative (Alt f a)
(Alternative f, Monoid a) => LeftSemiNearRing (Alt f a)
newtype App f m Source
if m is a Module over r and f is a Applicative then f App m is a Module over r as well
Constructors
App
getApp :: f m
show/hide Instances
(Reducer c m, Applicative f) => Reducer c (App f m)
(Module r m, Applicative f) => Module r (App f m)
(RightModule r m, Applicative f) => RightModule r (App f m)
(LeftModule r m, Applicative f) => LeftModule r (App f m)
Functor f => Functor (App f)
Applicative f => Applicative (App f)
Alternative f => Alternative (App f)
Pointed f => Pointed (App f)
Copointed f => Copointed (App f)
Eq (f m) => Eq (App f m)
Ord (f m) => Ord (App f m)
Read (f m) => Read (App f m)
Show (f m) => Show (App f m)
(Monoid m, Applicative f) => Monoid (App f m)
(Group m, Applicative f) => Group (App f m)
snocTraversal :: Reducer (f ()) (Traversal f) => Traversal f -> f () -> Traversal fSource
Efficiently avoid needlessly rebinding when using snoc on an action that already returns () A rewrite rule automatically applies this when possible
Produced by Haddock version 2.4.1