Module

Data.Lens.Lens

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

This module defines functions for working with lenses.

#lens' Source

lens' :: forall b a t s. (s -> Tuple a (b -> t)) -> Lens s t a b

#lens Source

lens :: forall b a t s. (s -> a) -> (s -> b -> t) -> Lens s t a b

Create a Lens from a getter/setter pair.

#withLens Source

withLens :: forall r b a t s. ALens s t a b -> ((s -> a) -> (s -> b -> t) -> r) -> r

#cloneLens Source

cloneLens :: forall b a t s. ALens s t a b -> Lens s t a b

#ilens' Source

ilens' :: forall b a t s i. (s -> Tuple (Tuple i a) (b -> t)) -> IndexedLens i s t a b

#ilens Source

ilens :: forall b a t s i. (s -> Tuple i a) -> (s -> b -> t) -> IndexedLens i s t a b

#withIndexedLens Source

withIndexedLens :: forall r b a t s i. (AnIndexedLens i s t a b) -> ((s -> (Tuple i a)) -> (s -> b -> t) -> r) -> r

#cloneIndexedLens Source

cloneIndexedLens :: forall b a t s i. AnIndexedLens i s t a b -> IndexedLens i s t a b

Re-exports from Data.Lens.Types

#Lens' Source

type Lens' s a = Lens s s a a

#Lens Source

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

A lens.

#IndexedLens' Source

type IndexedLens' i s a = IndexedLens i 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.

#AnIndexedLens' Source

type AnIndexedLens' i s a = AnIndexedLens 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

#ALens' Source

type ALens' s a = ALens s s a a

#ALens Source

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