module Pandora.Pattern.Functor.Traversable where
import Pandora.Pattern.Functor.Covariant (Covariant)
import Pandora.Pattern.Functor.Monoidal (Monoidal)
import Pandora.Paradigm.Primary.Algebraic.Product ((:*:))
infixl 5 <<-, -<<-<<-
class Covariant source target t => Traversable source target t where
(<<-) :: (Covariant source target u, Monoidal source 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 category 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 source 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 source target (:*:) (:*:) u) =>
source a (u b) -> target (t a) (u (t b))
(<<-) @category @category @t category a (u b)
f))