lens-5.2.3: Lenses, Folds and Traversals
Copyright(C) 2012-2016 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Lens.Internal.Fold

Description

 
Synopsis

Monoids for folding

newtype Folding f a Source #

Constructors

Folding 

Fields

Instances

Instances details
(Contravariant f, Applicative f) => Monoid (Folding f a) Source # 
Instance details

Defined in Control.Lens.Internal.Fold

Methods

mempty :: Folding f a Source #

mappend :: Folding f a -> Folding f a -> Folding f a Source #

mconcat :: [Folding f a] -> Folding f a Source #

(Contravariant f, Applicative f) => Semigroup (Folding f a) Source # 
Instance details

Defined in Control.Lens.Internal.Fold

Methods

(<>) :: Folding f a -> Folding f a -> Folding f a Source #

sconcat :: NonEmpty (Folding f a) -> Folding f a Source #

stimes :: Integral b => b -> Folding f a -> Folding f a Source #

newtype Traversed a f Source #

Used internally by traverseOf_ and the like.

The argument a of the result should not be used!

Constructors

Traversed 

Fields

Instances

Instances details
Applicative f => Monoid (Traversed a f) Source # 
Instance details

Defined in Control.Lens.Internal.Fold

Applicative f => Semigroup (Traversed a f) Source # 
Instance details

Defined in Control.Lens.Internal.Fold

Methods

(<>) :: Traversed a f -> Traversed a f -> Traversed a f Source #

sconcat :: NonEmpty (Traversed a f) -> Traversed a f Source #

stimes :: Integral b => b -> Traversed a f -> Traversed a f Source #

newtype TraversedF a f Source #

Used internally by traverse1Of_ and the like.

Since: 4.16

Constructors

TraversedF 

Fields

Instances

Instances details
(Apply f, Applicative f) => Monoid (TraversedF a f) Source # 
Instance details

Defined in Control.Lens.Internal.Fold

Apply f => Semigroup (TraversedF a f) Source # 
Instance details

Defined in Control.Lens.Internal.Fold

Methods

(<>) :: TraversedF a f -> TraversedF a f -> TraversedF a f Source #

sconcat :: NonEmpty (TraversedF a f) -> TraversedF a f Source #

stimes :: Integral b => b -> TraversedF a f -> TraversedF a f Source #

newtype Sequenced a m Source #

Used internally by mapM_ and the like.

The argument a of the result should not be used!

See 4.16 Changelog entry for the explanation of "why not Apply f =>"?

Constructors

Sequenced 

Fields

Instances

Instances details
Monad m => Monoid (Sequenced a m) Source # 
Instance details

Defined in Control.Lens.Internal.Fold

Monad m => Semigroup (Sequenced a m) Source # 
Instance details

Defined in Control.Lens.Internal.Fold

Methods

(<>) :: Sequenced a m -> Sequenced a m -> Sequenced a m Source #

sconcat :: NonEmpty (Sequenced a m) -> Sequenced a m Source #

stimes :: Integral b => b -> Sequenced a m -> Sequenced a m Source #

data Leftmost a Source #

Used for firstOf.

Constructors

LPure 
LLeaf a 
LStep (Leftmost a) 

Instances

Instances details
Monoid (Leftmost a) Source # 
Instance details

Defined in Control.Lens.Internal.Fold

Semigroup (Leftmost a) Source # 
Instance details

Defined in Control.Lens.Internal.Fold

getLeftmost :: Leftmost a -> Maybe a Source #

Extract the Leftmost element. This will fairly eagerly determine that it can return Just the moment it sees any element at all.

data Rightmost a Source #

Used for lastOf.

Constructors

RPure 
RLeaf a 
RStep (Rightmost a) 

Instances

Instances details
Monoid (Rightmost a) Source # 
Instance details

Defined in Control.Lens.Internal.Fold

Semigroup (Rightmost a) Source # 
Instance details

Defined in Control.Lens.Internal.Fold

getRightmost :: Rightmost a -> Maybe a Source #

Extract the Rightmost element. This will fairly eagerly determine that it can return Just the moment it sees any element at all.

data ReifiedMonoid a Source #

Constructors

ReifiedMonoid 

Fields

Semigroups for folding

newtype NonEmptyDList a Source #

Constructors

NonEmptyDList 

Fields