module Pandora.Pattern.Functor.Traversable where
import Pandora.Pattern.Functor.Covariant (Covariant)
import Pandora.Pattern.Functor.Monoidal (Monoidal)
import Pandora.Pattern.Morphism.Straight (Straight)
import Pandora.Paradigm.Algebraic.Product ((:*:))
infixl 1 <-/------
infixl 2 <-/-----
infixl 3 <-/----
infixl 4 <-/---, <-/-/-
infixl 5 <-/--
infixl 6 <-/-
class Covariant source target t => Traversable source target t where
(<-/-) :: (Covariant source target u, Monoidal (Straight source) (Straight target) (:*:) (:*:) u) => source a (u b) -> target (t a) (u (t b))
(<-/-------), (<-/------), (<-/-----), (<-/----), (<-/---), (<-/--)
:: (Covariant source target u, Monoidal (Straight source) (Straight target) (:*:) (:*:) u)
=> source a (u b) -> target (t a) (u (t b))
(<-/-------) = source a (u b) -> target (t a) (u (t b))
forall (source :: * -> * -> *) (target :: * -> * -> *)
(t :: * -> *) (u :: * -> *) a b.
(Traversable source target t, Covariant source target u,
Monoidal (Straight source) (Straight target) (:*:) (:*:) u) =>
source a (u b) -> target (t a) (u (t b))
(<-/-)
(<-/------) = source a (u b) -> target (t a) (u (t b))
forall (source :: * -> * -> *) (target :: * -> * -> *)
(t :: * -> *) (u :: * -> *) a b.
(Traversable source target t, Covariant source target u,
Monoidal (Straight source) (Straight target) (:*:) (:*:) u) =>
source a (u b) -> target (t a) (u (t b))
(<-/-)
(<-/-----) = source a (u b) -> target (t a) (u (t b))
forall (source :: * -> * -> *) (target :: * -> * -> *)
(t :: * -> *) (u :: * -> *) a b.
(Traversable source target t, Covariant source target u,
Monoidal (Straight source) (Straight target) (:*:) (:*:) u) =>
source a (u b) -> target (t a) (u (t b))
(<-/-)
(<-/----) = source a (u b) -> target (t a) (u (t b))
forall (source :: * -> * -> *) (target :: * -> * -> *)
(t :: * -> *) (u :: * -> *) a b.
(Traversable source target t, Covariant source target u,
Monoidal (Straight source) (Straight target) (:*:) (:*:) u) =>
source a (u b) -> target (t a) (u (t b))
(<-/-)
(<-/---) = source a (u b) -> target (t a) (u (t b))
forall (source :: * -> * -> *) (target :: * -> * -> *)
(t :: * -> *) (u :: * -> *) a b.
(Traversable source target t, Covariant source target u,
Monoidal (Straight source) (Straight target) (:*:) (:*:) u) =>
source a (u b) -> target (t a) (u (t b))
(<-/-)
(<-/--) = source a (u b) -> target (t a) (u (t b))
forall (source :: * -> * -> *) (target :: * -> * -> *)
(t :: * -> *) (u :: * -> *) a b.
(Traversable source target t, Covariant source target u,
Monoidal (Straight source) (Straight target) (:*:) (:*:) u) =>
source a (u b) -> target (t a) (u (t b))
(<-/-)
(<-/-/-) :: forall t u v category a b .
(Traversable category category t, Covariant category category u, Monoidal (Straight category) (Straight category) (:*:) (:*:) u, Traversable category category v)
=> category a (u b) -> category (v (t a)) (u (v (t b)))
<-/-/- :: category a (u b) -> category (v (t a)) (u (v (t b)))
(<-/-/-) category a (u b)
f = (category (t a) (u (t b)) -> category (v (t a)) (u (v (t b)))
forall (source :: * -> * -> *) (target :: * -> * -> *)
(t :: * -> *) (u :: * -> *) a b.
(Traversable source target t, Covariant source target u,
Monoidal (Straight source) (Straight target) (:*:) (:*:) u) =>
source a (u b) -> target (t a) (u (t b))
(<-/-) (category a (u b) -> category (t a) (u (t b))
forall (source :: * -> * -> *) (target :: * -> * -> *)
(t :: * -> *) (u :: * -> *) a b.
(Traversable source target t, Covariant source target u,
Monoidal (Straight source) (Straight target) (:*:) (:*:) u) =>
source a (u b) -> target (t a) (u (t b))
(<-/-) @category @category @t category a (u b)
f))