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)
- kIso :: Iso' (K1 t a x) a
- sumIso :: Iso' ((a :+: b) x) (Either (a x) (b x))
- _Left :: Prism' (Either a c) a
- _Right :: Prism' (Either c a) a
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 #