| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Proarrow.Optic.Traversal
Contents
Description
The traversal: the many-focus optic, distributing any
StrongDistributiveProfunctor with product strength
through the foci. This module keeps the mutually-recursive TravRes/MonTravRes flavor
classes and their leaf witnesses (Traversable and Cotraversable functors, the product lens,
the coproduct prism, Beside/BesideSum juxtaposition and the unit/zero witnesses); the
free-profunctor apparatus lives in Proarrow.Optic.MonoidalTraversal. A traversal subtypes to
Fold and Setter. Build with traversed (from a
Traversable) or traversal (from the van-Laarhoven form),
eliminate with traverseOf.
Synopsis
- class (SetterRes p q, FoldRes p q) => TravRes (p :: k +-> k) (q :: k +-> k) where
- travP :: forall r (s :: k) (a :: k) (b :: k) (t :: k). (StrongDistributiveProfunctor r, Strong (ProdAction :: k -> (PROD k, k) -> Type) r) => p s a -> q b t -> r a b -> r s t
- class TravRes p q => MonTravRes (p :: k +-> k) (q :: k +-> k) where
- monTravP :: forall r (s :: k) (a :: k) (b :: k) (t :: k). StrongDistributiveProfunctor r => p s a -> q b t -> r a b -> r s t
- type Traversal (s :: k) (t :: k) (a :: k) (b :: k) = Optic (Prostrong (TravRes :: (k +-> k) -> (k +-> k) -> Constraint)) s t a b
- type Traversal' (s :: k) (a :: k) = Traversal s s a a
- traverseOf :: forall {k} (w :: FLAVOR k k) (s :: k) (t :: k) (a :: k) (b :: k) p. (Distributive k, StrongDistributiveProfunctor p, Strong (ProdAction :: k -> (PROD k, k) -> Type) p, SubFlavor w (TravRes :: (k +-> k) -> (k +-> k) -> Constraint)) => Optic (Prostrong w) s t a b -> p a b -> p s t
- traversed :: forall {k} (t :: k +-> k) (a :: k) (b :: k). (Bicartesian k, Traversable t, Representable t, Ob a, Ob b) => Traversal (t % a) (t % b) a b
- data Beside (p1 :: k +-> k) (p2 :: k +-> k) (s :: k) (x :: k) where
- data CoBeside (q1 :: k +-> k) (q2 :: k +-> k) (x :: k) (t :: k) where
- data BesideSum (p1 :: k +-> k) (p2 :: k +-> k) (s :: k) (x :: k) where
- data CoBesideSum (q1 :: k +-> k) (q2 :: k +-> k) (x :: k) (t :: k) where
- CoBesideSum :: forall {k} (q1 :: k +-> k) (x :: k) (t1 :: k) (q2 :: k +-> k) (t2 :: k) (t :: k). q1 x t1 -> q2 x t2 -> ((t1 || t2) ~> t) -> CoBesideSum q1 q2 x t
- data UnitW (s :: k) (x :: k) where
- data CoUnitW (x :: k) (t :: k) where
- data ZeroW (s :: k) (x :: k) where
- ZeroW :: forall {k} (x :: k) (s :: k). Ob x => (s ~> (InitialObject :: k)) -> ZeroW s x
- data CoZeroW (x :: k) (t :: k) where
- CoZeroW :: forall {k} (x :: k) (t :: k). Ob x => ((InitialObject :: k) ~> t) -> CoZeroW x t
Documentation
class (SetterRes p q, FoldRes p q) => TravRes (p :: k +-> k) (q :: k +-> k) where Source Github #
Minimal complete definition
Nothing
Methods
travP :: forall r (s :: k) (a :: k) (b :: k) (t :: k). (StrongDistributiveProfunctor r, Strong (ProdAction :: k -> (PROD k, k) -> Type) r) => p s a -> q b t -> r a b -> r s t Source Github #
Distribute a traversal-strength profunctor. Only the product-lens witness genuinely needs
(to carry the residual through the categorical product); every other
witness distributes a plain Strong ProdActionStrongDistributiveProfunctor and inherits travP from monTravP.
default travP :: forall r (s :: k) (a :: k) (b :: k) (t :: k). (MonTravRes p q, StrongDistributiveProfunctor r) => p s a -> q b t -> r a b -> r s t Source Github #
Instances
| (Bicartesian k, Traversable t, Representable t) => TravRes (t :: k +-> k) (RepCostar t :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal Methods travP :: forall r (s :: k) (a :: k) (b :: k) (t0 :: k). (StrongDistributiveProfunctor r, Strong (ProdAction :: k -> (PROD k, k) -> Type) r) => t s a -> RepCostar t b t0 -> r a b -> r s t0 Source Github # | |
| Monoidal k => TravRes (Two :: k -> k -> Type) (CoTwo :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Kaleidoscope | |
| Monoidal k => TravRes (UnitW :: k -> k -> Type) (CoUnitW :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal | |
| HasInitialObject k => TravRes (ZeroW :: k -> k -> Type) (CoZeroW :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal | |
| CategoryOf k => TravRes (Id :: k -> k -> Type) (Id :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal | |
| (Monoidal k, KnownNat n) => TravRes (Pow n :: k -> k -> Type) (CoPow n :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Kaleidoscope | |
| Comonoid m => TravRes (LensW m :: k -> k -> Type) (CoLensW m :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.MonoidalLens | |
| (CopyDiscard k, Ob a) => TravRes (TensorW a :: k -> k -> Type) (CoTensorW a :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.MonoidalTraversal | |
| (Bicartesian k, Cotraversable t, Corepresentable t) => TravRes (CorepStar t :: k -> k -> Type) (t :: k +-> k) Source Github # | The former cotraversal witness: a corepresentable |
Defined in Proarrow.Optic.Traversal Methods travP :: forall r (s :: k) (a :: k) (b :: k) (t0 :: k). (StrongDistributiveProfunctor r, Strong (ProdAction :: k -> (PROD k, k) -> Type) r) => CorepStar t s a -> t b t0 -> r a b -> r s t0 Source Github # | |
| (TravRes p1 q1, TravRes p2 q2, Monoidal k) => TravRes (Beside p1 p2 :: k -> k -> Type) (CoBeside q1 q2 :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal | |
| (TravRes p1 q1, TravRes p2 q2, HasBinaryCoproducts k) => TravRes (BesideSum p1 p2 :: k -> k -> Type) (CoBesideSum q1 q2 :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal Methods travP :: forall r (s :: k) (a :: k) (b :: k) (t :: k). (StrongDistributiveProfunctor r, Strong (ProdAction :: k -> (PROD k, k) -> Type) r) => BesideSum p1 p2 s a -> CoBesideSum q1 q2 b t -> r a b -> r s t Source Github # | |
| (CopyDiscard k, HasCoproducts k, Ob t) => TravRes (Rep (Coproduct t) :: k -> k -> Type) (Corep (Coproduct t) :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal | |
| (HasBinaryProducts k, Ob s) => TravRes (Rep (Product s) :: k -> k -> Type) (Corep (Product s) :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal | |
| (TravRes f g, TravRes f' g') => TravRes (f :.: f' :: i -> i -> Type) (g' :.: g :: i -> i -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal | |
class TravRes p q => MonTravRes (p :: k +-> k) (q :: k +-> k) where Source Github #
A monoidal traversal sits between Kaleidoscope and
Traversal: it distributes any StrongDistributiveProfunctor without the product-strength a
lens-as-traversal needs. Every traversal witness except the product lens is a monoidal traversal.
Methods
monTravP :: forall r (s :: k) (a :: k) (b :: k) (t :: k). StrongDistributiveProfunctor r => p s a -> q b t -> r a b -> r s t Source Github #
Instances
type Traversal (s :: k) (t :: k) (a :: k) (b :: k) = Optic (Prostrong (TravRes :: (k +-> k) -> (k +-> k) -> Constraint)) s t a b Source Github #
type Traversal' (s :: k) (a :: k) = Traversal s s a a Source Github #
traverseOf :: forall {k} (w :: FLAVOR k k) (s :: k) (t :: k) (a :: k) (b :: k) p. (Distributive k, StrongDistributiveProfunctor p, Strong (ProdAction :: k -> (PROD k, k) -> Type) p, SubFlavor w (TravRes :: (k +-> k) -> (k +-> k) -> Constraint)) => Optic (Prostrong w) s t a b -> p a b -> p s t Source Github #
Traverse: distribute any StrongDistributiveProfunctor -- not merely a Star f (the
Hask van-Laarhoven shape) -- through any optic that is at least a Traversal. Works for an
arbitrary profunctor carrier by handing it to travP, rather than relying on a per-carrier
bridge (which could only ever cover specific carrier heads).Prostrong w p
traversed :: forall {k} (t :: k +-> k) (a :: k) (b :: k). (Bicartesian k, Traversable t, Representable t, Ob a, Ob b) => Traversal (t % a) (t % b) a b Source Github #
Build a traversal from a Traversable (representable) functor t: it focuses every element
the functor holds. This is the one weak-flavor builder that is genuinely primitive -- a
Traversables traversal is not reachable by convert from any single stronger optic. The
witness is t itself paired with (see RepCostar tTravRes above); the two legs are the
representable universal and the identity repUnivRepCostar.
The free traversal profunctor
data Beside (p1 :: k +-> k) (p2 :: k +-> k) (s :: k) (x :: k) where Source Github #
Witness pair for traversing two juxtaposed (tensored) parts in sequence, both parts
focusing the same type x.
Beside and CoBeside are each one half of Day with the
two foci types identified -- a one-sided Day convolution, pointwise in the shared focus. The
identification is essential: a ( witness pair admits no componentwise Day p1 p2,
Day q1 q2)travP
(that would require splitting a StrongDistributiveProfunctor value at a tensor), which is
why DayRes-flavored optics focus pairs a1 ** a2 while these
witnesses visit each half's foci in sequence.
Constructors
| Beside :: forall {k} (s :: k) (s1 :: k) (s2 :: k) (p1 :: k +-> k) (x :: k) (p2 :: k +-> k). (s ~> (s1 ** s2)) -> p1 s1 x -> p2 s2 x -> Beside p1 p2 s x |
Instances
| (Profunctor p1, Profunctor p2, Monoidal k) => Profunctor (Beside p1 p2 :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal Methods dimap :: forall (c :: k) (a :: k) (b :: k) (d :: k). (c ~> a) -> (b ~> d) -> Beside p1 p2 a b -> Beside p1 p2 c d Source Github # lmap :: forall (c :: k) (a :: k) (b :: k). (c ~> a) -> Beside p1 p2 a b -> Beside p1 p2 c b Source Github # rmap :: forall (b :: k) (d :: k) (a :: k). (b ~> d) -> Beside p1 p2 a b -> Beside p1 p2 a d Source Github # (\\) :: forall (a :: k) (b :: k) r. ((Ob a, Ob b) => r) -> Beside p1 p2 a b -> r Source Github # | |
| (Proadjunction p1 q1, Proadjunction p2 q2, Monoidal k) => Proadjunction (Beside p1 p2 :: k -> k -> Type) (CoBeside q1 q2 :: k -> k -> Type) Source Github # | |
| (FoldRes p1 q1, FoldRes p2 q2, Monoidal k) => FoldRes (Beside p1 p2 :: k -> k -> Type) (CoBeside q1 q2 :: k -> k -> Type) Source Github # | |
| (SetterRes p1 q1, SetterRes p2 q2, Monoidal k) => SetterRes (Beside p1 p2 :: k -> k -> Type) (CoBeside q1 q2 :: k -> k -> Type) Source Github # | |
| (MonTravRes p1 q1, MonTravRes p2 q2, Monoidal k) => MonTravRes (Beside p1 p2 :: k -> k -> Type) (CoBeside q1 q2 :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal | |
| (TravRes p1 q1, TravRes p2 q2, Monoidal k) => TravRes (Beside p1 p2 :: k -> k -> Type) (CoBeside q1 q2 :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal | |
data CoBeside (q1 :: k +-> k) (q2 :: k +-> k) (x :: k) (t :: k) where Source Github #
Constructors
| CoBeside :: forall {k} (q1 :: k +-> k) (x :: k) (t1 :: k) (q2 :: k +-> k) (t2 :: k) (t :: k). q1 x t1 -> q2 x t2 -> ((t1 ** t2) ~> t) -> CoBeside q1 q2 x t |
Instances
| (Profunctor q1, Profunctor q2, Monoidal k) => Profunctor (CoBeside q1 q2 :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal Methods dimap :: forall (c :: k) (a :: k) (b :: k) (d :: k). (c ~> a) -> (b ~> d) -> CoBeside q1 q2 a b -> CoBeside q1 q2 c d Source Github # lmap :: forall (c :: k) (a :: k) (b :: k). (c ~> a) -> CoBeside q1 q2 a b -> CoBeside q1 q2 c b Source Github # rmap :: forall (b :: k) (d :: k) (a :: k). (b ~> d) -> CoBeside q1 q2 a b -> CoBeside q1 q2 a d Source Github # (\\) :: forall (a :: k) (b :: k) r. ((Ob a, Ob b) => r) -> CoBeside q1 q2 a b -> r Source Github # | |
| (Proadjunction p1 q1, Proadjunction p2 q2, Monoidal k) => Proadjunction (Beside p1 p2 :: k -> k -> Type) (CoBeside q1 q2 :: k -> k -> Type) Source Github # | |
| (FoldRes p1 q1, FoldRes p2 q2, Monoidal k) => FoldRes (Beside p1 p2 :: k -> k -> Type) (CoBeside q1 q2 :: k -> k -> Type) Source Github # | |
| (SetterRes p1 q1, SetterRes p2 q2, Monoidal k) => SetterRes (Beside p1 p2 :: k -> k -> Type) (CoBeside q1 q2 :: k -> k -> Type) Source Github # | |
| (MonTravRes p1 q1, MonTravRes p2 q2, Monoidal k) => MonTravRes (Beside p1 p2 :: k -> k -> Type) (CoBeside q1 q2 :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal | |
| (TravRes p1 q1, TravRes p2 q2, Monoidal k) => TravRes (Beside p1 p2 :: k -> k -> Type) (CoBeside q1 q2 :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal | |
data BesideSum (p1 :: k +-> k) (p2 :: k +-> k) (s :: k) (x :: k) where Source Github #
Witness pair for traversing one of two alternative (coproduct) parts: the same one-sided
Day convolution as Beside/CoBeside, but over the coproduct monoidal structure (cf.
Coprod).
Constructors
| BesideSum :: forall {k} (s :: k) (s1 :: k) (s2 :: k) (p1 :: k +-> k) (x :: k) (p2 :: k +-> k). (s ~> (s1 || s2)) -> p1 s1 x -> p2 s2 x -> BesideSum p1 p2 s x |
Instances
| (Profunctor p1, Profunctor p2, CategoryOf k) => Profunctor (BesideSum p1 p2 :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal Methods dimap :: forall (c :: k) (a :: k) (b :: k) (d :: k). (c ~> a) -> (b ~> d) -> BesideSum p1 p2 a b -> BesideSum p1 p2 c d Source Github # lmap :: forall (c :: k) (a :: k) (b :: k). (c ~> a) -> BesideSum p1 p2 a b -> BesideSum p1 p2 c b Source Github # rmap :: forall (b :: k) (d :: k) (a :: k). (b ~> d) -> BesideSum p1 p2 a b -> BesideSum p1 p2 a d Source Github # (\\) :: forall (a :: k) (b :: k) r. ((Ob a, Ob b) => r) -> BesideSum p1 p2 a b -> r Source Github # | |
| (Proadjunction p1 q1, Proadjunction p2 q2, HasBinaryCoproducts k) => Proadjunction (BesideSum p1 p2 :: k -> k -> Type) (CoBesideSum q1 q2 :: k -> k -> Type) Source Github # | |
| (FoldRes p1 q1, FoldRes p2 q2, HasBinaryCoproducts k) => FoldRes (BesideSum p1 p2 :: k -> k -> Type) (CoBesideSum q1 q2 :: k -> k -> Type) Source Github # | |
| (SetterRes p1 q1, SetterRes p2 q2, HasBinaryCoproducts k) => SetterRes (BesideSum p1 p2 :: k -> k -> Type) (CoBesideSum q1 q2 :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal | |
| (MonTravRes p1 q1, MonTravRes p2 q2, HasBinaryCoproducts k) => MonTravRes (BesideSum p1 p2 :: k -> k -> Type) (CoBesideSum q1 q2 :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal Methods monTravP :: forall r (s :: k) (a :: k) (b :: k) (t :: k). StrongDistributiveProfunctor r => BesideSum p1 p2 s a -> CoBesideSum q1 q2 b t -> r a b -> r s t Source Github # | |
| (TravRes p1 q1, TravRes p2 q2, HasBinaryCoproducts k) => TravRes (BesideSum p1 p2 :: k -> k -> Type) (CoBesideSum q1 q2 :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal Methods travP :: forall r (s :: k) (a :: k) (b :: k) (t :: k). (StrongDistributiveProfunctor r, Strong (ProdAction :: k -> (PROD k, k) -> Type) r) => BesideSum p1 p2 s a -> CoBesideSum q1 q2 b t -> r a b -> r s t Source Github # | |
data CoBesideSum (q1 :: k +-> k) (q2 :: k +-> k) (x :: k) (t :: k) where Source Github #
The covariant half of the BesideSum witness pair: recomposes the branches' targets,
(t1 .|| t2) ~> t
Constructors
| CoBesideSum :: forall {k} (q1 :: k +-> k) (x :: k) (t1 :: k) (q2 :: k +-> k) (t2 :: k) (t :: k). q1 x t1 -> q2 x t2 -> ((t1 || t2) ~> t) -> CoBesideSum q1 q2 x t |
Instances
| (Profunctor q1, Profunctor q2, CategoryOf k) => Profunctor (CoBesideSum q1 q2 :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal Methods dimap :: forall (c :: k) (a :: k) (b :: k) (d :: k). (c ~> a) -> (b ~> d) -> CoBesideSum q1 q2 a b -> CoBesideSum q1 q2 c d Source Github # lmap :: forall (c :: k) (a :: k) (b :: k). (c ~> a) -> CoBesideSum q1 q2 a b -> CoBesideSum q1 q2 c b Source Github # rmap :: forall (b :: k) (d :: k) (a :: k). (b ~> d) -> CoBesideSum q1 q2 a b -> CoBesideSum q1 q2 a d Source Github # (\\) :: forall (a :: k) (b :: k) r. ((Ob a, Ob b) => r) -> CoBesideSum q1 q2 a b -> r Source Github # | |
| (Proadjunction p1 q1, Proadjunction p2 q2, HasBinaryCoproducts k) => Proadjunction (BesideSum p1 p2 :: k -> k -> Type) (CoBesideSum q1 q2 :: k -> k -> Type) Source Github # | |
| (FoldRes p1 q1, FoldRes p2 q2, HasBinaryCoproducts k) => FoldRes (BesideSum p1 p2 :: k -> k -> Type) (CoBesideSum q1 q2 :: k -> k -> Type) Source Github # | |
| (SetterRes p1 q1, SetterRes p2 q2, HasBinaryCoproducts k) => SetterRes (BesideSum p1 p2 :: k -> k -> Type) (CoBesideSum q1 q2 :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal | |
| (MonTravRes p1 q1, MonTravRes p2 q2, HasBinaryCoproducts k) => MonTravRes (BesideSum p1 p2 :: k -> k -> Type) (CoBesideSum q1 q2 :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal Methods monTravP :: forall r (s :: k) (a :: k) (b :: k) (t :: k). StrongDistributiveProfunctor r => BesideSum p1 p2 s a -> CoBesideSum q1 q2 b t -> r a b -> r s t Source Github # | |
| (TravRes p1 q1, TravRes p2 q2, HasBinaryCoproducts k) => TravRes (BesideSum p1 p2 :: k -> k -> Type) (CoBesideSum q1 q2 :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal Methods travP :: forall r (s :: k) (a :: k) (b :: k) (t :: k). (StrongDistributiveProfunctor r, Strong (ProdAction :: k -> (PROD k, k) -> Type) r) => BesideSum p1 p2 s a -> CoBesideSum q1 q2 b t -> r a b -> r s t Source Github # | |
data UnitW (s :: k) (x :: k) where Source Github #
Witness pair with no foci at all: decompose to Unit and rebuild.
UnitW and CoUnitW are the two halves of DayUnit, one
per side of the witness pair, with a phantom focus: together with Beside/CoBeside being
the halves of Day, the witness pairs here are exactly the
Day-monoidal structure on profunctors (),
split at the focus. The split is forced: a whole Monoidal (j +-> k)DayUnit
on the decomposition side would demand Unit ~> a for an arbitrary focus a.
Instances
| Monoidal k => Profunctor (UnitW :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal Methods dimap :: forall (c :: k) (a :: k) (b :: k) (d :: k). (c ~> a) -> (b ~> d) -> UnitW a b -> UnitW c d Source Github # lmap :: forall (c :: k) (a :: k) (b :: k). (c ~> a) -> UnitW a b -> UnitW c b Source Github # rmap :: forall (b :: k) (d :: k) (a :: k). (b ~> d) -> UnitW a b -> UnitW a d Source Github # (\\) :: forall (a :: k) (b :: k) r. ((Ob a, Ob b) => r) -> UnitW a b -> r Source Github # | |
| Monoidal k => Proadjunction (UnitW :: k -> k -> Type) (CoUnitW :: k -> k -> Type) Source Github # | |
| Monoidal k => FoldRes (UnitW :: k -> k -> Type) (CoUnitW :: k -> k -> Type) Source Github # | |
| Monoidal k => SetterRes (UnitW :: k -> k -> Type) (CoUnitW :: k -> k -> Type) Source Github # | |
| Monoidal k => MonTravRes (UnitW :: k -> k -> Type) (CoUnitW :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal | |
| Monoidal k => TravRes (UnitW :: k -> k -> Type) (CoUnitW :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal | |
data CoUnitW (x :: k) (t :: k) where Source Github #
Instances
| Monoidal k => Profunctor (CoUnitW :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal Methods dimap :: forall (c :: k) (a :: k) (b :: k) (d :: k). (c ~> a) -> (b ~> d) -> CoUnitW a b -> CoUnitW c d Source Github # lmap :: forall (c :: k) (a :: k) (b :: k). (c ~> a) -> CoUnitW a b -> CoUnitW c b Source Github # rmap :: forall (b :: k) (d :: k) (a :: k). (b ~> d) -> CoUnitW a b -> CoUnitW a d Source Github # (\\) :: forall (a :: k) (b :: k) r. ((Ob a, Ob b) => r) -> CoUnitW a b -> r Source Github # | |
| Monoidal k => Proadjunction (UnitW :: k -> k -> Type) (CoUnitW :: k -> k -> Type) Source Github # | |
| Monoidal k => FoldRes (UnitW :: k -> k -> Type) (CoUnitW :: k -> k -> Type) Source Github # | |
| Monoidal k => SetterRes (UnitW :: k -> k -> Type) (CoUnitW :: k -> k -> Type) Source Github # | |
| Monoidal k => MonTravRes (UnitW :: k -> k -> Type) (CoUnitW :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal | |
| Monoidal k => TravRes (UnitW :: k -> k -> Type) (CoUnitW :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal | |
data ZeroW (s :: k) (x :: k) where Source Github #
Witness pair for the impossible case: decompose to the initial object -- the halves of the
(unspelled) unit of Day convolution over the coproduct monoidal structure, cf.
UnitW/CoUnitW.
Constructors
| ZeroW :: forall {k} (x :: k) (s :: k). Ob x => (s ~> (InitialObject :: k)) -> ZeroW s x |
Instances
| HasInitialObject k => Profunctor (ZeroW :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal Methods dimap :: forall (c :: k) (a :: k) (b :: k) (d :: k). (c ~> a) -> (b ~> d) -> ZeroW a b -> ZeroW c d Source Github # lmap :: forall (c :: k) (a :: k) (b :: k). (c ~> a) -> ZeroW a b -> ZeroW c b Source Github # rmap :: forall (b :: k) (d :: k) (a :: k). (b ~> d) -> ZeroW a b -> ZeroW a d Source Github # (\\) :: forall (a :: k) (b :: k) r. ((Ob a, Ob b) => r) -> ZeroW a b -> r Source Github # | |
| HasInitialObject k => Proadjunction (ZeroW :: k -> k -> Type) (CoZeroW :: k -> k -> Type) Source Github # | |
| HasInitialObject k => FoldRes (ZeroW :: k -> k -> Type) (CoZeroW :: k -> k -> Type) Source Github # | |
| HasInitialObject k => SetterRes (ZeroW :: k -> k -> Type) (CoZeroW :: k -> k -> Type) Source Github # | |
| HasInitialObject k => MonTravRes (ZeroW :: k -> k -> Type) (CoZeroW :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal | |
| HasInitialObject k => TravRes (ZeroW :: k -> k -> Type) (CoZeroW :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal | |
data CoZeroW (x :: k) (t :: k) where Source Github #
The covariant half of the ZeroW witness pair: rebuilds the target from InitialObject.
Constructors
| CoZeroW :: forall {k} (x :: k) (t :: k). Ob x => ((InitialObject :: k) ~> t) -> CoZeroW x t |
Instances
| HasInitialObject k => Profunctor (CoZeroW :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal Methods dimap :: forall (c :: k) (a :: k) (b :: k) (d :: k). (c ~> a) -> (b ~> d) -> CoZeroW a b -> CoZeroW c d Source Github # lmap :: forall (c :: k) (a :: k) (b :: k). (c ~> a) -> CoZeroW a b -> CoZeroW c b Source Github # rmap :: forall (b :: k) (d :: k) (a :: k). (b ~> d) -> CoZeroW a b -> CoZeroW a d Source Github # (\\) :: forall (a :: k) (b :: k) r. ((Ob a, Ob b) => r) -> CoZeroW a b -> r Source Github # | |
| HasInitialObject k => Proadjunction (ZeroW :: k -> k -> Type) (CoZeroW :: k -> k -> Type) Source Github # | |
| HasInitialObject k => FoldRes (ZeroW :: k -> k -> Type) (CoZeroW :: k -> k -> Type) Source Github # | |
| HasInitialObject k => SetterRes (ZeroW :: k -> k -> Type) (CoZeroW :: k -> k -> Type) Source Github # | |
| HasInitialObject k => MonTravRes (ZeroW :: k -> k -> Type) (CoZeroW :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal | |
| HasInitialObject k => TravRes (ZeroW :: k -> k -> Type) (CoZeroW :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Optic.Traversal | |