Telescope
A telescope is an extension of an NS, where every time we "go right" in the sum we have an additional value.
The Telescope API mostly follows sop-core conventions, supporting
functor (hmap, hcmap), applicative (hap, hpure), foldable
(hcollapse) and traversable (hsequence'). However, since Telescope
is a bi-functor, it cannot reuse the sop-core classes. The naming scheme
of the functions is adopted from sop-core though; for example:
bi h (c) zipWith
| | | |
| | | \ zipWith: the name from base
| | |
| | \ constrained: version of the function with a constraint parameter
| |
| \ higher order: 'Telescope' (like 'NS'/'NP') is a /higher order/ functor
|
\ bifunctor: 'Telescope' (unlike 'NS'/'NP') is a higher order /bifunctor/In addition to the standard SOP operators, the new operators that make a Telescope a telescope are extend, retract and align; see their documentation for details.
Instances12HTrans, HAp, HSequence, HTraverse_, Eq, Ord, …
(forall (x :: k2) (y :: k2). LiftedCoercible g g x y) => HTrans (Telescope g) (Telescope g)Defined in sop-extras-0.4.1.1 · Data.SOP.TelescopeHAp (Telescope g)Defined in sop-extras-0.4.1.1 · Data.SOP.TelescopeHSequence (Telescope g)Defined in sop-extras-0.4.1.1 · Data.SOP.TelescopeHTraverse_ (Telescope g)Defined in sop-extras-0.4.1.1 · Data.SOP.Telescope(All (Compose Eq g) xs, All (Compose Eq f) xs) => Eq (Telescope g f xs)Defined in sop-extras-0.4.1.1 · Data.SOP.Telescope(All (Compose Eq g) xs, All (Compose Ord g) xs, All (Compose Eq f) xs, All (Compose Ord f) xs) => Ord (Telescope g f xs)Defined in sop-extras-0.4.1.1 · Data.SOP.Telescope(All (Compose Show g) xs, All (Compose Show f) xs) => Show (Telescope g f xs)Defined in sop-extras-0.4.1.1 · Data.SOP.Telescope(All (Compose NoThunks g) xs, All (Compose NoThunks f) xs) => NoThunks (Telescope g f xs)Defined in sop-extras-0.4.1.1 · Data.SOP.Telescopetype Prod (Telescope g) = NPDefined in sop-extras-0.4.1.1 · Data.SOP.Telescopetype AllN (Telescope g) c = All cDefined in sop-extras-0.4.1.1 · Data.SOP.Telescopetype Same (Telescope g) = Telescope gDefined in sop-extras-0.4.1.1 · Data.SOP.Telescopetype SListIN (Telescope g) = SListIDefined in sop-extras-0.4.1.1 · Data.SOP.Telescope