Copyright | (C) 2012-15 Edward Kmett |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | provisional |
Portability | Rank2Types |
Safe Haskell | None |
Language | Haskell98 |
- newtype ReifiedLens s t a b = Lens {}
- type ReifiedLens' s a = ReifiedLens s s a a
- newtype ReifiedIndexedLens i s t a b = IndexedLens {
- runIndexedLens :: IndexedLens i s t a b
- type ReifiedIndexedLens' i s a = ReifiedIndexedLens i s s a a
- newtype ReifiedIndexedTraversal i s t a b = IndexedTraversal {
- runIndexedTraversal :: IndexedTraversal i s t a b
- type ReifiedIndexedTraversal' i s a = ReifiedIndexedTraversal i s s a a
- newtype ReifiedTraversal s t a b = Traversal {
- runTraversal :: Traversal s t a b
- type ReifiedTraversal' s a = ReifiedTraversal s s a a
- newtype ReifiedGetter s a = Getter {}
- newtype ReifiedIndexedGetter i s a = IndexedGetter {
- runIndexedGetter :: IndexedGetter i s a
- newtype ReifiedFold s a = Fold {}
- newtype ReifiedIndexedFold i s a = IndexedFold {
- runIndexedFold :: IndexedFold i s a
- newtype ReifiedSetter s t a b = Setter {}
- type ReifiedSetter' s a = ReifiedSetter s s a a
- newtype ReifiedIndexedSetter i s t a b = IndexedSetter {
- runIndexedSetter :: IndexedSetter i s t a b
- type ReifiedIndexedSetter' i s a = ReifiedIndexedSetter i s s a a
- newtype ReifiedIso s t a b = Iso {}
- type ReifiedIso' s a = ReifiedIso s s a a
- newtype ReifiedPrism s t a b = Prism {}
- type ReifiedPrism' s a = ReifiedPrism s s a a
Documentation
>>>
import Control.Lens
newtype ReifiedLens s t a b Source
Reify a Lens
so it can be stored safely in a container.
type ReifiedLens' s a = ReifiedLens s s a a Source
typeReifiedLens'
=Simple
ReifiedLens
newtype ReifiedIndexedLens i s t a b Source
Reify an IndexedLens
so it can be stored safely in a container.
IndexedLens | |
|
type ReifiedIndexedLens' i s a = ReifiedIndexedLens i s s a a Source
typeReifiedIndexedLens'
i =Simple
(ReifiedIndexedLens
i)
newtype ReifiedIndexedTraversal i s t a b Source
Reify an IndexedTraversal
so it can be stored safely in a container.
IndexedTraversal | |
|
type ReifiedIndexedTraversal' i s a = ReifiedIndexedTraversal i s s a a Source
typeReifiedIndexedTraversal'
i =Simple
(ReifiedIndexedTraversal
i)
newtype ReifiedTraversal s t a b Source
A form of Traversal
that can be stored monomorphically in a container.
Traversal | |
|
type ReifiedTraversal' s a = ReifiedTraversal s s a a Source
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)
Arrow ReifiedGetter Source | |
ArrowChoice ReifiedGetter Source | |
ArrowApply ReifiedGetter Source | |
ArrowLoop ReifiedGetter Source | |
Profunctor ReifiedGetter Source | |
Strong ReifiedGetter Source | |
Costrong ReifiedGetter Source | |
Choice ReifiedGetter Source | |
Representable ReifiedGetter Source | |
Corepresentable ReifiedGetter Source | |
Conjoined ReifiedGetter Source | |
Category * ReifiedGetter Source | |
Sieve ReifiedGetter Identity Source | |
Cosieve ReifiedGetter Identity Source | |
MonadReader s (ReifiedGetter s) Source | |
Monad (ReifiedGetter s) Source | |
Functor (ReifiedGetter s) Source | |
Applicative (ReifiedGetter s) Source | |
Monoid s => ComonadApply (ReifiedGetter s) Source | |
Monoid s => Comonad (ReifiedGetter s) Source | |
Bind (ReifiedGetter s) Source | |
Apply (ReifiedGetter s) Source | |
Semigroup s => Extend (ReifiedGetter s) Source | |
Distributive (ReifiedGetter s) Source | |
type Rep ReifiedGetter = Identity Source | |
type Corep ReifiedGetter = Identity Source |
newtype ReifiedIndexedGetter i s a Source
Reify an IndexedGetter
so it can be stored safely in a container.
IndexedGetter | |
|
Profunctor (ReifiedIndexedGetter i) Source | |
Strong (ReifiedIndexedGetter i) Source | |
Representable (ReifiedIndexedGetter i) Source | |
Sieve (ReifiedIndexedGetter i) ((,) i) Source | |
Functor (ReifiedIndexedGetter i s) Source | |
Semigroup i => Apply (ReifiedIndexedGetter i s) Source | |
type Rep (ReifiedIndexedGetter i) = (,) i Source |
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
is isomorphic to ReifiedFold
sReaderT s []
and provides similar
instances.
>>>
("hello","world")^..runFold ((,) <$> Fold _2 <*> Fold both)
[("world","hello"),("world","world")]
Arrow ReifiedFold Source | |
ArrowChoice ReifiedFold Source | |
ArrowApply ReifiedFold Source | |
Profunctor ReifiedFold Source | |
Strong ReifiedFold Source | |
Choice ReifiedFold Source | |
Representable ReifiedFold Source | |
Category * ReifiedFold Source | |
Sieve ReifiedFold [] Source | |
MonadReader s (ReifiedFold s) Source | |
Monad (ReifiedFold s) Source | |
Functor (ReifiedFold s) Source | |
Applicative (ReifiedFold s) Source | |
Alternative (ReifiedFold s) Source | |
MonadPlus (ReifiedFold s) Source | |
Bind (ReifiedFold s) Source | |
Apply (ReifiedFold s) Source | |
Alt (ReifiedFold s) Source | |
Plus (ReifiedFold s) Source | |
Monoid (ReifiedFold s a) Source | |
Semigroup (ReifiedFold s a) Source | |
type Rep ReifiedFold = [] Source |
newtype ReifiedIndexedFold i s a Source
IndexedFold | |
|
Profunctor (ReifiedIndexedFold i) Source | |
Strong (ReifiedIndexedFold i) Source | |
Representable (ReifiedIndexedFold i) Source | |
Sieve (ReifiedIndexedFold i) (Compose [] ((,) i)) Source | |
Functor (ReifiedIndexedFold i s) Source | |
Alt (ReifiedIndexedFold i s) Source | |
Plus (ReifiedIndexedFold i s) Source | |
Monoid (ReifiedIndexedFold i s a) Source | |
Semigroup (ReifiedIndexedFold i s a) Source | |
type Rep (ReifiedIndexedFold i) = Compose [] ((,) i) Source |
newtype ReifiedSetter s t a b Source
Reify a Setter
so it can be stored safely in a container.
type ReifiedSetter' s a = ReifiedSetter s s a a Source
typeReifiedSetter'
=Simple
ReifiedSetter
newtype ReifiedIndexedSetter i s t a b Source
Reify an IndexedSetter
so it can be stored safely in a container.
IndexedSetter | |
|
type ReifiedIndexedSetter' i s a = ReifiedIndexedSetter i s s a a Source
typeReifiedIndexedSetter'
i =Simple
(ReifiedIndexedSetter
i)
newtype ReifiedIso s t a b Source
Reify an Iso
so it can be stored safely in a container.
type ReifiedIso' s a = ReifiedIso s s a a Source
typeReifiedIso'
=Simple
ReifiedIso
newtype ReifiedPrism s t a b Source
Reify a Prism
so it can be stored safely in a container.
type ReifiedPrism' s a = ReifiedPrism s s a a Source
typeReifiedPrism'
=Simple
ReifiedPrism