lens-1.4.1: Lenses, Folds and Traversals

PortabilityRank2Types
Stabilityprovisional
MaintainerEdward Kmett <ekmett@gmail.com>
Safe HaskellSafe-Infered

Control.Lens.Internal

Contents

Description

These are some of the explicit Functor instances that leak into the type signatures of Control.Lens. You shouldn't need to import this module directly, unless you are coming up with a whole new kind of "Family" and need to add instances.

Synopsis

Implementation details

data IndexedStore c d a Source

The indexed store can be used to characterize a LensFamily and is used by clone

Constructors

IndexedStore (d -> a) c 

Instances

newtype Focusing m c a Source

Used by Focus

Constructors

Focusing 

Fields

unfocusing :: m (c, a)
 

Instances

Monad m => Functor (Focusing m c) 
(Monad m, Monoid c) => Applicative (Focusing m c) 

newtype Traversed f Source

Used internally by traverseOf_, mapM_ and the like.

Constructors

Traversed 

Fields

getTraversed :: f ()
 

Instances

newtype Action m Source

Used internally by mapM_ and the like.

Constructors

Action 

Fields

getAction :: m ()
 

Instances

Monad m => Monoid (Action m) 

newtype AppliedState f a Source

Applicative composition of State Int with a Functor, used by elementOf, elementsOf, traverseElement, traverseElementsOf

Constructors

AppliedState 

Fields

runAppliedState :: Int -> (f a, Int)
 

data Min a Source

Used for minimumOf

Constructors

NoMin 
Min a 

Instances

Ord a => Monoid (Min a) 

getMin :: Min a -> Maybe aSource

Obtain the minimum

data Max a Source

Used for maximumOf

Constructors

NoMax 
Max a 

Instances

Ord a => Monoid (Max a) 

getMax :: Max a -> Maybe aSource

Obtain the maximum

data ElementOf f a Source

Used to find the nth element of a Traversal.

Constructors

ElementOf 

Fields

getElementOf :: Int -> ElementOfResult f a
 

Instances

data ElementOfResult f a Source

The result of trying to find the nth element of a Traversal.

Constructors

Searching !Int a 
Found !Int (f a) 

Instances