Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | hpacheco@di.uminho.pt |
Pointless Lenses: bidirectional lenses with point-free programming
This module provides specialized versions of recursion patterns to avoid using the internal classes and type families. These functions are more efficient and better for profiling and runtime tests.
- innNat :: Either One Nat -> Nat
- outNat :: Nat -> Either One Nat
- innNat_lns :: Lens (Either One Nat) Nat
- outNat_lns :: Lens Nat (Either One Nat)
- innMaybe :: Either One a -> Maybe a
- outMaybe :: Maybe a -> Either One a
- innMaybe_lns :: Lens (Either One a) (Maybe a)
- outMaybe_lns :: Lens (Maybe a) (Either One a)
- innList :: Either One (a, [a]) -> [a]
- outList :: [a] -> Either One (a, [a])
- innList_lns :: Lens (Either One (a, [a])) [a]
- outList_lns :: Lens [a] (Either One (a, [a]))
- outNeList :: NeList a b -> Either a (b, NeList a b)
- innNeList :: Either a (b, NeList a b) -> NeList a b
- cataList :: (Either One (a, b) -> b) -> [a] -> b
- anaList :: (b -> Either One (a, b)) -> b -> [a]
- fmapList :: (x -> y) -> Either z (a, x) -> Either z (a, y)
- fmapNat :: (x -> y) -> Either a x -> Either a y
- fzipList :: (a -> c) -> (Either z (x, a), Either z (x, c)) -> Either z (x, (a, c))
- fzipNat :: (a -> c) -> (Either z a, Either z c) -> Either z (a, c)
- cataList_lns :: Lens (Either One (a, b)) b -> Lens [a] b
- hyloList :: (Either x (y, c) -> c) -> (a -> Either x (y, a)) -> a -> c
- outNeNat :: NeNat a -> Either a (NeNat a)
- data NeNat a
- cataNeNat :: (Either a c -> c) -> NeNat a -> c
- anaNeNat :: (c -> Either a c) -> c -> NeNat a
- accumNeNat :: ((Either a y, x) -> y) -> ((Either a (NeNat a), x) -> Either a (NeNat a, x)) -> (NeNat a, x) -> y
- cataNeNat_lns :: Lens (Either a c) c -> Lens (NeNat a) c
- anaNeNat_lns :: Lens c (Either a c) -> Lens c (NeNat a)
- hyloNeNat_lns :: Lens (Either x b) b -> Lens a (Either x a) -> Lens a b
- data NeList a b
- cataNeList :: (Either a (b, c) -> c) -> NeList a b -> c
- anaNeList :: (c -> Either a (b, c)) -> c -> NeList a b
- accumNeList :: ((Either a (b, y), x) -> y) -> ((Either a (b, NeList a b), x) -> Either a (b, (NeList a b, x))) -> (NeList a b, x) -> y
- cataNeList_lns :: Lens (Either a (b, c)) c -> Lens (NeList a b) c
- anaNeList_lns :: Lens c (Either a (b, c)) -> Lens c (NeList a b)
- hyloNeList_lns :: Lens (Either x (y, b)) b -> Lens a (Either x (y, a)) -> Lens a b
- length_pf :: a -> Lens [a] Nat
- plus_pf :: Lens (Nat, Nat) Nat
- suml_pf :: Lens [Nat] Nat
- cat_pf :: Lens ([a], [a]) [a]
- concat_pf :: Lens [[a]] [a]
- map_pf :: Lens a b -> Lens [a] [b]
- filter_left_pf :: Lens [Either a b] [a]
- filter_right_pf :: Lens [Either a b] [b]
Documentation
innList_lns :: Lens (Either One (a, [a])) [a]Source
outList_lns :: Lens [a] (Either One (a, [a]))Source
accumNeNat :: ((Either a y, x) -> y) -> ((Either a (NeNat a), x) -> Either a (NeNat a, x)) -> (NeNat a, x) -> ySource
cataNeList :: (Either a (b, c) -> c) -> NeList a b -> cSource
accumNeList :: ((Either a (b, y), x) -> y) -> ((Either a (b, NeList a b), x) -> Either a (b, (NeList a b, x))) -> (NeList a b, x) -> ySource
Examples
filter_left_pf :: Lens [Either a b] [a]Source
filter_right_pf :: Lens [Either a b] [b]Source