Module

Data.Lens.Types

Package
purescript-profunctor-lenses
Repository
purescript-contrib/purescript-profunctor-lenses

This module defines types for working with lenses.

#Optic Source

type Optic p s t a b = p a b -> p s t

A general-purpose Data.Lens.

#Optic' Source

type Optic' p s a = Optic p s s a a

#Iso Source

type Iso s t a b = forall p. Profunctor p => Optic p s t a b

A generalized isomorphism.

#Iso' Source

type Iso' s a = Iso s s a a

#AnIso Source

type AnIso s t a b = Optic (Exchange a b) s t a b

#AnIso' Source

type AnIso' s a = AnIso s s a a

#Lens Source

type Lens s t a b = forall p. Strong p => Optic p s t a b

A lens.

#Lens' Source

type Lens' s a = Lens s s a a

#ALens Source

type ALens s t a b = Optic (Shop a b) s t a b

#ALens' Source

type ALens' s a = ALens s s a a

#IndexedLens Source

type IndexedLens i s t a b = forall p. Strong p => IndexedOptic p i s t a b

An indexed lens.

#IndexedLens' Source

type IndexedLens' i s a = IndexedLens i s s a a

#AnIndexedLens Source

type AnIndexedLens i s t a b = IndexedOptic (Shop (Tuple i a) b) i s t a b

#AnIndexedLens' Source

type AnIndexedLens' i s a = AnIndexedLens i s s a a

#Prism Source

type Prism s t a b = forall p. Choice p => Optic p s t a b

A prism.

#Prism' Source

type Prism' s a = Prism s s a a

#APrism Source

type APrism s t a b = Optic (Market a b) s t a b

#APrism' Source

type APrism' s a = APrism s s a a

#Traversal Source

type Traversal s t a b = forall p. Wander p => Optic p s t a b

A traversal.

#Traversal' Source

type Traversal' s a = Traversal s s a a

#Grate Source

type Grate s t a b = forall p. Closed p => Optic p s t a b

A grate (http://r6research.livejournal.com/28050.html)

#Grate' Source

type Grate' s a = Grate s s a a

#AGrate Source

type AGrate s t a b = Optic (Grating a b) s t a b

#AGrate' Source

type AGrate' s a = AGrate s s a a

#Getter Source

type Getter s t a b = Fold a s t a b

A getter.

#Getter' Source

type Getter' s a = Getter s s a a

#Setter Source

type Setter s t a b = Optic Function s t a b

A setter.

#Setter' Source

type Setter' s a = Setter s s a a

#Review Source

type Review s t a b = Optic Tagged s t a b

A review.

#Review' Source

type Review' s a = Review s s a a

#Fold Source

type Fold r s t a b = Optic (Forget r) s t a b

A fold.

#Fold' Source

type Fold' r s a = Fold r s s a a

#IndexedOptic Source

type IndexedOptic p i s t a b = Indexed p i a b -> p s t

An indexed optic.

#IndexedOptic' Source

type IndexedOptic' p i s a = IndexedOptic p i s s a a

#IndexedTraversal Source

type IndexedTraversal i s t a b = forall p. Wander p => IndexedOptic p i s t a b

An indexed traversal.

#IndexedTraversal' Source

type IndexedTraversal' i s a = IndexedTraversal i s s a a

#IndexedFold Source

type IndexedFold r i s t a b = IndexedOptic (Forget r) i s t a b

An indexed fold.

#IndexedFold' Source

type IndexedFold' r i s a = IndexedFold r i s s a a

#IndexedGetter Source

type IndexedGetter i s t a b = IndexedFold a i s t a b

An indexed getter.

#IndexedGetter' Source

type IndexedGetter' i s a = IndexedGetter i s s a a

#IndexedSetter Source

type IndexedSetter i s t a b = IndexedOptic Function i s t a b

An indexed setter.

#IndexedSetter' Source

type IndexedSetter' i s a = IndexedSetter i s s a a

Re-exports from Data.Lens.Internal.Exchange

#Exchange Source

data Exchange a b s t

The Exchange profunctor characterizes an Iso.

Constructors

Instances

Re-exports from Data.Lens.Internal.Forget

#Forget Source

newtype Forget r a b

Profunctor that forgets the b value and returns (and accumulates) a value of type r.

Forget r is isomorphic to Star (Const r), but can be given a Cochoice instance.

Constructors

Instances

Re-exports from Data.Lens.Internal.Grating

#Grating Source

newtype Grating a b s t

Instances

Re-exports from Data.Lens.Internal.Indexed

#Indexed Source

newtype Indexed p i s t

Profunctor used for IndexedOptics.

Constructors

Instances

Re-exports from Data.Lens.Internal.Market

#Market Source

data Market a b s t

The Market profunctor characterizes a Prism.

Constructors

Instances

Re-exports from Data.Lens.Internal.Re

#Re Source

newtype Re p s t a b

Constructors

  • Re (p b a -> p t s)

Instances

Re-exports from Data.Lens.Internal.Shop

#Shop Source

data Shop a b s t

The Shop profunctor characterizes a Lens.

Constructors

  • Shop (s -> a) (s -> b -> t)

Instances

Re-exports from Data.Lens.Internal.Tagged

Re-exports from Data.Lens.Internal.Wander

#Wander Source

class (Strong p, Choice p) <= Wander p  where

Class for profunctors that support polymorphic traversals.

Members

  • wander :: forall s t a b. (forall f. Applicative f => (a -> f b) -> s -> f t) -> p a b -> p s t

Instances