lens-1.9.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 Lens 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_ and the like.

Constructors

Traversed 

Fields

getTraversed :: f ()
 

Instances

newtype Sequenced m Source

Used internally by mapM_ and the like.

Constructors

Sequenced 

Fields

getSequenced :: m ()
 

Instances

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

newtype ElementOf f a Source

Used to find the nth element of a Traversal.

Constructors

ElementOf 

Fields

getElementOf :: Int -> ElementOfResult f a
 

Instances

Functor f => Functor (ElementOf f) 
Functor f => Applicative (ElementOf f) 
Gettable f => Gettable (ElementOf f)

This instance is a lie, but it is a useful lie.

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) 
NotFound String 

Instances