Lens.Simple

The fundamental lens operations: view, set and over

view

set

over

Stock lenses (_1, _2) and mere traversals (_Left, _Right, _Just, etc.) for simple Prelude types

_1

_2

_Left

_Right

_Just

_Nothing

both

LensLike and important strength-expressing synonyms, from the all-powerful Lens downward

type Lens a a' b b'

type Traversal a a' b b'

type Setter a a' b b'

type Getter a a' b b'

type Fold a a' b b'

type FoldLike r a a' b b'

type SetterLike a a' b b'

type LensLike f a a' b b'

Support for defining lenses and weaker 'optics' (see also the TH incantations below )

lens

iso

to

setting

folding

Operator equivalents for common lens-applying operators: particularly (^.), (.~) and (%~) (i.e. view, set and over)

(^.)

(%~)

(.~)

(&)

(??)

(?~)

(^..)

(^?)

Basic state-related combinators: zoom, use, assign/(.=) etc.

zoom

use

uses

assign

Convenient state-related operators

(%=)

(.=)

(%%=)

(<~)

Pseudo-imperatives

(+~)

(*~)

(-~)

(//~)

(&&~)

(||~)

(<>~)

Corresponding state-related imperatives

(+=)

(-=)

(*=)

(//=)

(&&=)

(||=)

(<>=)

More stock lenses

chosen

ix

at

intAt

contains

intContains

More stock traversals

ignored

More stock setters

mapped

Other combinators

views

toListOf

allOf

anyOf

firstOf

lastOf

sumOf

productOf

lengthOf

nullOf

backwards

choosing

alongside

beside

TH incantations

makeLenses

makeTraversals

makeLensesBy

makeLensesFor

Other type synonyms

type LensLike' f a b

type Lens' a b

type Traversal' a b

type Getter' a b

type Setter' a b

type FoldLike' r a b

type ASetter' a b

type ASetter a a' b b'

Helper classes

class Identical f

class Phantom f

Helper types

data AlongsideLeft f b a

data AlongsideRight f a b

data Zooming m c a

Re-exports

data Constant k a b

data Identity a

class Monoid a

(<>)