| Copyright | (C) 2012-2014 Edward Kmett |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Edward Kmett <ekmett@gmail.com> |
| Stability | provisional |
| Portability | non-portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell98 |
Control.Lens.Internal.Getter
Contents
Description
- class (Contravariant f, Functor f) => Gettable f
- coerce :: (Contravariant f, Functor f) => f a -> f b
- noEffect :: (Contravariant f, Applicative f) => f a
- newtype AlongsideLeft f b a = AlongsideLeft {
- getAlongsideLeft :: f (a, b)
- newtype AlongsideRight f a b = AlongsideRight {
- getAlongsideRight :: f (a, b)
Internal Classes
class (Contravariant f, Functor f) => Gettable f Source
This class is provided mostly for backwards compatibility with lens 3.8, but it can also shorten type signatures.
Instances
| (Contravariant f, Functor f) => Gettable f |
Getters
coerce :: (Contravariant f, Functor f) => f a -> f b Source
This Generalizes Const so we can apply simple Applicative
transformations to it and so we can get nicer error messages.
A Functor you can coerce ignores its argument, which it carries solely as a
phantom type parameter.
By the Functor and Contravariant laws, an instance of Gettable will necessarily satisfy:
id=fmapf =coerce=contramapg
noEffect :: (Contravariant f, Applicative f) => f a Source
The mempty equivalent for a Gettable Applicative Functor.
newtype AlongsideLeft f b a Source
Constructors
| AlongsideLeft | |
Fields
| |
Instances
| Effective m r f => Effective m r (AlongsideLeft f b) | |
| Traversable f => Bitraversable (AlongsideLeft f) | |
| Functor f => Bifunctor (AlongsideLeft f) | |
| Foldable f => Bifoldable (AlongsideLeft f) | |
| Functor f => Functor (AlongsideLeft f b) | |
| Foldable f => Foldable (AlongsideLeft f b) | |
| Traversable f => Traversable (AlongsideLeft f b) | |
| Contravariant f => Contravariant (AlongsideLeft f b) | |
| Traversable1 f => Traversable1 (AlongsideLeft f b) | |
| Foldable1 f => Foldable1 (AlongsideLeft f b) | |
| Read (f (a, b)) => Read (AlongsideLeft f b a) | |
| Show (f (a, b)) => Show (AlongsideLeft f b a) |
newtype AlongsideRight f a b Source
Constructors
| AlongsideRight | |
Fields
| |
Instances
| Effective m r f => Effective m r (AlongsideRight f b) | |
| Traversable f => Bitraversable (AlongsideRight f) | |
| Functor f => Bifunctor (AlongsideRight f) | |
| Foldable f => Bifoldable (AlongsideRight f) | |
| Functor f => Functor (AlongsideRight f a) | |
| Foldable f => Foldable (AlongsideRight f a) | |
| Traversable f => Traversable (AlongsideRight f a) | |
| Contravariant f => Contravariant (AlongsideRight f a) | |
| Traversable1 f => Traversable1 (AlongsideRight f a) | |
| Foldable1 f => Foldable1 (AlongsideRight f a) | |
| Read (f (a, b)) => Read (AlongsideRight f a b) | |
| Show (f (a, b)) => Show (AlongsideRight f a b) |