lens-5.0.1: Lenses, Folds and Traversals
Copyright (C) 2012-16 Edward Kmett
License BSD-style (see the file LICENSE)
Maintainer Edward Kmett <ekmett@gmail.com>
Stability provisional
Portability Rank2Types
Safe Haskell Safe-Inferred
Language Haskell2010

Control.Lens.Reified

Description

Synopsis

Documentation

>>> import Control.Lens
>>> import Control.Applicative

newtype ReifiedLens s t a b Source #

Reify a Lens so it can be stored safely in a container.

Constructors

Lens

Fields

newtype ReifiedIndexedLens i s t a b Source #

Reify an IndexedLens so it can be stored safely in a container.

Constructors

IndexedLens

newtype ReifiedIndexedTraversal i s t a b Source #

Reify an IndexedTraversal so it can be stored safely in a container.

newtype ReifiedTraversal s t a b Source #

A form of Traversal that can be stored monomorphically in a container.

Constructors

Traversal

Fields

newtype ReifiedGetter s a Source #

Reify a Getter so it can be stored safely in a container.

This can also be useful when combining getters in novel ways, as ReifiedGetter is isomorphic to (->) and provides similar instances.

>>> ("hello","world","!!!")^.runGetter ((,) <$> Getter _2 <*> Getter (_1.to length))
("world",5)

Constructors

Getter

Fields

Instances

Instances details
Arrow ReifiedGetter Source #
Instance details

Defined in Control.Lens.Reified

ArrowChoice ReifiedGetter Source #
Instance details

Defined in Control.Lens.Reified

ArrowApply ReifiedGetter Source #
Instance details

Defined in Control.Lens.Reified

ArrowLoop ReifiedGetter Source #
Instance details

Defined in Control.Lens.Reified

Profunctor ReifiedGetter Source #
Instance details

Defined in Control.Lens.Reified

Representable ReifiedGetter Source #
Instance details

Defined in Control.Lens.Reified

Corepresentable ReifiedGetter Source #
Instance details

Defined in Control.Lens.Reified

Choice ReifiedGetter Source #
Instance details

Defined in Control.Lens.Reified

Closed ReifiedGetter Source #
Instance details

Defined in Control.Lens.Reified

Strong ReifiedGetter Source #
Instance details

Defined in Control.Lens.Reified

Costrong ReifiedGetter Source #
Instance details

Defined in Control.Lens.Reified

Conjoined ReifiedGetter Source #
Instance details

Defined in Control.Lens.Reified

Sieve ReifiedGetter Identity Source #
Instance details

Defined in Control.Lens.Reified

Cosieve ReifiedGetter Identity Source #
Instance details

Defined in Control.Lens.Reified

MonadReader s ( ReifiedGetter s) Source #
Instance details

Defined in Control.Lens.Reified

Monad ( ReifiedGetter s) Source #
Instance details

Defined in Control.Lens.Reified

Functor ( ReifiedGetter s) Source #
Instance details

Defined in Control.Lens.Reified

Applicative ( ReifiedGetter s) Source #
Instance details

Defined in Control.Lens.Reified

Distributive ( ReifiedGetter s) Source #
Instance details

Defined in Control.Lens.Reified

Monoid s => Comonad ( ReifiedGetter s) Source #
Instance details

Defined in Control.Lens.Reified

Monoid s => ComonadApply ( ReifiedGetter s) Source #
Instance details

Defined in Control.Lens.Reified

Apply ( ReifiedGetter s) Source #
Instance details

Defined in Control.Lens.Reified

Bind ( ReifiedGetter s) Source #
Instance details

Defined in Control.Lens.Reified

Semigroup s => Extend ( ReifiedGetter s) Source #
Instance details

Defined in Control.Lens.Reified

Category ReifiedGetter Source #
Instance details

Defined in Control.Lens.Reified

Methods

id :: forall (a :: k). ReifiedGetter a a Source #

(.) :: forall (b :: k) (c :: k) (a :: k). ReifiedGetter b c -> ReifiedGetter a b -> ReifiedGetter a c Source #

type Rep ReifiedGetter Source #
Instance details

Defined in Control.Lens.Reified

type Corep ReifiedGetter Source #
Instance details

Defined in Control.Lens.Reified

newtype ReifiedIndexedGetter i s a Source #

Reify an IndexedGetter so it can be stored safely in a container.

Instances

Instances details
Profunctor ( ReifiedIndexedGetter i) Source #
Instance details

Defined in Control.Lens.Reified

Representable ( ReifiedIndexedGetter i) Source #
Instance details

Defined in Control.Lens.Reified

Strong ( ReifiedIndexedGetter i) Source #
Instance details

Defined in Control.Lens.Reified

Sieve ( ReifiedIndexedGetter i) ( (,) i) Source #
Instance details

Defined in Control.Lens.Reified

Methods

sieve :: ReifiedIndexedGetter i a b -> a -> (i, b) Source #

Functor ( ReifiedIndexedGetter i s) Source #
Instance details

Defined in Control.Lens.Reified

Semigroup i => Apply ( ReifiedIndexedGetter i s) Source #
Instance details

Defined in Control.Lens.Reified

type Rep ( ReifiedIndexedGetter i) Source #
Instance details

Defined in Control.Lens.Reified

newtype ReifiedFold s a Source #

Reify a Fold so it can be stored safely in a container.

This can also be useful for creatively combining folds as ReifiedFold s is isomorphic to ReaderT s [] and provides similar instances.

>>> ("hello","world")^..runFold ((,) <$> Fold _2 <*> Fold both)
[("world","hello"),("world","world")]

Constructors

Fold

Fields

Instances

Instances details
Arrow ReifiedFold Source #
Instance details

Defined in Control.Lens.Reified

ArrowChoice ReifiedFold Source #
Instance details

Defined in Control.Lens.Reified

ArrowApply ReifiedFold Source #
Instance details

Defined in Control.Lens.Reified

Profunctor ReifiedFold Source #
Instance details

Defined in Control.Lens.Reified

Methods

dimap :: (a -> b) -> (c -> d) -> ReifiedFold b c -> ReifiedFold a d Source #

lmap :: (a -> b) -> ReifiedFold b c -> ReifiedFold a c Source #

rmap :: (b -> c) -> ReifiedFold a b -> ReifiedFold a c Source #

(#.) :: forall a b c q. Coercible c b => q b c -> ReifiedFold a b -> ReifiedFold a c Source #

(.#) :: forall a b c q. Coercible b a => ReifiedFold b c -> q a b -> ReifiedFold a c Source #

Representable ReifiedFold Source #
Instance details

Defined in Control.Lens.Reified

Choice ReifiedFold Source #
Instance details

Defined in Control.Lens.Reified

Strong ReifiedFold Source #
Instance details

Defined in Control.Lens.Reified

Sieve ReifiedFold [] Source #
Instance details

Defined in Control.Lens.Reified

Methods

sieve :: ReifiedFold a b -> a -> [b] Source #

MonadReader s ( ReifiedFold s) Source #
Instance details

Defined in Control.Lens.Reified

Monad ( ReifiedFold s) Source #
Instance details

Defined in Control.Lens.Reified

Functor ( ReifiedFold s) Source #
Instance details

Defined in Control.Lens.Reified

Applicative ( ReifiedFold s) Source #
Instance details

Defined in Control.Lens.Reified

Alternative ( ReifiedFold s) Source #
Instance details

Defined in Control.Lens.Reified

MonadPlus ( ReifiedFold s) Source #
Instance details

Defined in Control.Lens.Reified

Plus ( ReifiedFold s) Source #
Instance details

Defined in Control.Lens.Reified

Alt ( ReifiedFold s) Source #
Instance details

Defined in Control.Lens.Reified

Apply ( ReifiedFold s) Source #
Instance details

Defined in Control.Lens.Reified

Bind ( ReifiedFold s) Source #
Instance details

Defined in Control.Lens.Reified

Category ReifiedFold Source #
Instance details

Defined in Control.Lens.Reified

Methods

id :: forall (a :: k). ReifiedFold a a Source #

(.) :: forall (b :: k) (c :: k) (a :: k). ReifiedFold b c -> ReifiedFold a b -> ReifiedFold a c Source #

Semigroup ( ReifiedFold s a) Source #
Instance details

Defined in Control.Lens.Reified

Monoid ( ReifiedFold s a) Source #
Instance details

Defined in Control.Lens.Reified

type Rep ReifiedFold Source #
Instance details

Defined in Control.Lens.Reified

newtype ReifiedIndexedFold i s a Source #

Instances

Instances details
Profunctor ( ReifiedIndexedFold i) Source #
Instance details

Defined in Control.Lens.Reified

Representable ( ReifiedIndexedFold i) Source #
Instance details

Defined in Control.Lens.Reified

Strong ( ReifiedIndexedFold i) Source #
Instance details

Defined in Control.Lens.Reified

Sieve ( ReifiedIndexedFold i) ( Compose [] ( (,) i)) Source #
Instance details

Defined in Control.Lens.Reified

Functor ( ReifiedIndexedFold i s) Source #
Instance details

Defined in Control.Lens.Reified

Plus ( ReifiedIndexedFold i s) Source #
Instance details

Defined in Control.Lens.Reified

Alt ( ReifiedIndexedFold i s) Source #
Instance details

Defined in Control.Lens.Reified

Semigroup ( ReifiedIndexedFold i s a) Source #
Instance details

Defined in Control.Lens.Reified

Monoid ( ReifiedIndexedFold i s a) Source #
Instance details

Defined in Control.Lens.Reified

type Rep ( ReifiedIndexedFold i) Source #
Instance details

Defined in Control.Lens.Reified

newtype ReifiedSetter s t a b Source #

Reify a Setter so it can be stored safely in a container.

Constructors

Setter

Fields

newtype ReifiedIndexedSetter i s t a b Source #

Reify an IndexedSetter so it can be stored safely in a container.

newtype ReifiedIso s t a b Source #

Reify an Iso so it can be stored safely in a container.

Constructors

Iso

Fields

newtype ReifiedPrism s t a b Source #

Reify a Prism so it can be stored safely in a container.

Constructors

Prism

Fields