Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | hpacheco@di.uminho.pt |
Pointless Lenses: bidirectional lenses with point-free programming
This module lifts a standard set of point-free combinators into bidirectional lenses.
- ap_lns :: Eq a => a -> Lens (a -> b, a) b
- (?<) :: Eq a => Lens (a -> Bool, a) (Either a a)
- rexp_lns :: Lens b c -> Lens (a -> b) (a -> c)
- (.<) :: Lens b a -> Lens c b -> Lens c a
- fst_lns :: b -> Lens (a, b) a
- snd_lns :: a -> Lens (a, b) b
- (><<) :: Lens c a -> Lens d b -> Lens (c, d) (a, b)
- (.\/<) :: Lens a c -> Lens b c -> Lens (Either a b) c
- (\/.<) :: Lens a c -> Lens b c -> Lens (Either a b) c
- (-|-<) :: Lens c a -> Lens d b -> Lens (Either c d) (Either a b)
- sum_lns :: ((a, d) -> c) -> ((b, c) -> d) -> Lens c a -> Lens d b -> Lens (Either c d) (Either a b)
- (!<) :: c -> Lens c One
- (!\/<) :: Eq a => a -> Lens c a -> Lens (Either c b) a
- (\/!<) :: Eq a => a -> Lens b a -> Lens (Either c b) a
- id_lns :: Lens c c
- distp :: ((c, d), (a, b)) -> ((c, a), (d, b))
- distp_lns :: Lens ((c, d), (a, b)) ((c, a), (d, b))
- dists :: (Either a b, Either c d) -> Either (Either (a, c) (a, d)) (Either (b, c) (b, d))
- dists_lns :: Lens (Either a b, Either c d) (Either (Either (a, c) (a, d)) (Either (b, c) (b, d)))
- swap_lns :: Lens (a, b) (b, a)
- coswap_lns :: Lens (Either a b) (Either b a)
- distl_lns :: Lens (Either a b, c) (Either (a, c) (b, c))
- undistl_lns :: Lens (Either (a, c) (b, c)) (Either a b, c)
- distr_lns :: Lens (c, Either a b) (Either (c, a) (c, b))
- undistr_lns :: Lens (Either (c, a) (c, b)) (c, Either a b)
- assocl_lns :: Lens (a, (b, c)) ((a, b), c)
- assocr_lns :: Lens ((a, b), c) (a, (b, c))
- coassocl_lns :: Lens (Either a (Either b c)) (Either (Either a b) c)
- coassocr_lns :: Lens (Either (Either a b) c) (Either a (Either b c))
Point-free lens combinators
rexp_lns :: Lens b c -> Lens (a -> b) (a -> c)Source
The right exponentiation combinator as a lens. Applies a lens to the domain of a function.
(.\/<) :: Lens a c -> Lens b c -> Lens (Either a b) cSource
The left-biased /
point-free combinator.
It chooses left values over right values in the create
direction.
(\/.<) :: Lens a c -> Lens b c -> Lens (Either a b) cSource
The right-biased /
point-free combinator.
It chooses right values over left values in the create
direction.
(-|-<) :: Lens c a -> Lens d b -> Lens (Either c d) (Either a b)Source
The -|-
point-free combinator.
sum_lns :: ((a, d) -> c) -> ((b, c) -> d) -> Lens c a -> Lens d b -> Lens (Either c d) (Either a b)Source
The -|-
point-free combinator with user-defined backward behavior.
(!\/<) :: Eq a => a -> Lens c a -> Lens (Either c b) aSource
The (a!) / f
point-free expression, where a
is a constant and f
a function.
(\/!<) :: Eq a => a -> Lens b a -> Lens (Either c b) aSource
The f / (a!)
point-free expression, where a
is a constant and f
a function.
Point-free isomorphism combinators
dists :: (Either a b, Either c d) -> Either (Either (a, c) (a, d)) (Either (b, c) (b, d))Source
The sum distribution combinator.
dists_lns :: Lens (Either a b, Either c d) (Either (Either (a, c) (a, d)) (Either (b, c) (b, d)))Source
The dists
point-free combinator.
coswap_lns :: Lens (Either a b) (Either b a)Source
The coswap
point-free combinator
undistl_lns :: Lens (Either (a, c) (b, c)) (Either a b, c)Source
The undistl
point-free combinator.
undistr_lns :: Lens (Either (c, a) (c, b)) (c, Either a b)Source
The undistr
point-free combinator.
assocl_lns :: Lens (a, (b, c)) ((a, b), c)Source
The assocl
point-free combinator.
assocr_lns :: Lens ((a, b), c) (a, (b, c))Source
The assocr
point-free combinator.