reducers-3.12.4: Semigroups, specialized containers and a general map/reduce framework
Copyright(c) Edward Kmett 2009
LicenseBSD-style
Maintainerekmett@gmail.com
Stabilityexperimental
Portabilitynon-portable (MPTCs)
Safe HaskellTrustworthy
LanguageHaskell2010

Data.Semigroup.Applicative

Description

Semigroups for working with Applicative Functors.

Synopsis

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

Instances

Instances details
Applicative f => Semigroup (Traversal f) Source # 
Instance details

Defined in Data.Semigroup.Applicative

Methods

(<>) :: Traversal f -> Traversal f -> Traversal f #

sconcat :: NonEmpty (Traversal f) -> Traversal f #

stimes :: Integral b => b -> Traversal f -> Traversal f #

Applicative f => Monoid (Traversal f) Source # 
Instance details

Defined in Data.Semigroup.Applicative

Applicative f => Reducer (f a) (Traversal f) Source # 
Instance details

Defined in Data.Semigroup.Applicative

Methods

unit :: f a -> Traversal f Source #

snoc :: Traversal f -> f a -> Traversal f Source #

cons :: f a -> Traversal f -> Traversal f Source #

newtype Ap f m Source #

Constructors

Ap 

Fields

Instances

Instances details
Functor f => Functor (Ap f) Source # 
Instance details

Defined in Data.Semigroup.Applicative

Methods

fmap :: (a -> b) -> Ap f a -> Ap f b #

(<$) :: a -> Ap f b -> Ap f a #

Applicative f => Applicative (Ap f) Source # 
Instance details

Defined in Data.Semigroup.Applicative

Methods

pure :: a -> Ap f a #

(<*>) :: Ap f (a -> b) -> Ap f a -> Ap f b #

liftA2 :: (a -> b -> c) -> Ap f a -> Ap f b -> Ap f c #

(*>) :: Ap f a -> Ap f b -> Ap f b #

(<*) :: Ap f a -> Ap f b -> Ap f a #

(Applicative f, Reducer c m) => Reducer (f c) (Ap f m) Source # 
Instance details

Defined in Data.Semigroup.Applicative

Methods

unit :: f c -> Ap f m Source #

snoc :: Ap f m -> f c -> Ap f m Source #

cons :: f c -> Ap f m -> Ap f m Source #

(Applicative f, Semigroup m) => Semigroup (Ap f m) Source # 
Instance details

Defined in Data.Semigroup.Applicative

Methods

(<>) :: Ap f m -> Ap f m -> Ap f m #

sconcat :: NonEmpty (Ap f m) -> Ap f m #

stimes :: Integral b => b -> Ap f m -> Ap f m #

(Applicative f, Monoid m) => Monoid (Ap f m) Source # 
Instance details

Defined in Data.Semigroup.Applicative

Methods

mempty :: Ap f m #

mappend :: Ap f m -> Ap f m -> Ap f m #

mconcat :: [Ap f m] -> Ap f m #