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 | 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)
newtype ReifiedIndexedGetter i s a Source
Reify an IndexedGetter
so it can be stored safely in a container.
IndexedGetter | |
|
Representable (ReifiedIndexedGetter i) Source | |
Strong (ReifiedIndexedGetter i) Source | |
Profunctor (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 | |
Representable ReifiedFold Source | |
Choice ReifiedFold Source | |
Strong ReifiedFold Source | |
Profunctor 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 | |
Plus (ReifiedFold s) Source | |
Alt (ReifiedFold s) Source | |
Apply (ReifiedFold s) Source | |
Bind (ReifiedFold s) Source | |
Monoid (ReifiedFold s a) Source | |
Semigroup (ReifiedFold s a) Source | |
type Rep ReifiedFold = [] Source |
newtype ReifiedIndexedFold i s a Source
IndexedFold | |
|
Representable (ReifiedIndexedFold i) Source | |
Strong (ReifiedIndexedFold i) Source | |
Profunctor (ReifiedIndexedFold i) Source | |
Sieve (ReifiedIndexedFold i) (Compose [] ((,) i)) Source | |
Functor (ReifiedIndexedFold i s) Source | |
Plus (ReifiedIndexedFold i s) Source | |
Alt (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