Copyright | (C) 2017 Csongor Kiss |
---|---|
License | BSD3 |
Maintainer | Csongor Kiss <kiss.csongor.kiss@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Internal lens helpers. Only exported for Haddock
- type Lens' s a = forall f. Functor f => (a -> f a) -> s -> f s
- type Prism' s a = forall p f. (Choice p, Applicative f) => p a (f a) -> p s (f s)
- type Iso' s a = forall p f. (Profunctor p, Functor f) => p a (f a) -> p s (f s)
- (^.) :: s -> ((a -> Const a a) -> s -> Const a s) -> a
- set :: ((a -> Identity b) -> s -> Identity t) -> b -> s -> t
- first :: Lens' ((a :*: b) x) (a x)
- second :: Lens' ((a :*: b) x) (b x)
- left :: Prism' ((a :+: b) x) (a x)
- right :: Prism' ((a :+: b) x) (b x)
- combine :: Lens' (s x) a -> Lens' (t x) a -> Lens' ((s :+: t) x) a
- prism :: (a -> s) -> (s -> Either s a) -> Prism' s a
- repIso :: Generic a => Iso' a (Rep a x)
- mIso :: Iso' (M1 i c f p) (f p)
- mLens :: Lens' (M1 i c f p) (f p)
- repLens :: Generic a => Lens' a (Rep a x)
- sumIso :: Iso' ((a :+: b) x) (Either (a x) (b x))
- _Left :: Prism' (Either a c) a
- _Right :: Prism' (Either c a) a
- data Coyoneda f b = Coyoneda (a -> b) (f a)
- inj :: Functor f => Coyoneda f a -> f a
- proj :: Functor f => f a -> Coyoneda f a
- ravel :: Functor f => ((a -> Coyoneda f b) -> s -> Coyoneda f t) -> (a -> f b) -> s -> f t
Documentation
type Prism' s a = forall p f. (Choice p, Applicative f) => p a (f a) -> p s (f s) Source #
Type alias for prism
type Iso' s a = forall p f. (Profunctor p, Functor f) => p a (f a) -> p s (f s) Source #