module Pandora.Pattern.Functor (module Exports, (<*+>), (<**+>), (<***+>)) where

import Pandora.Pattern.Functor.Bivariant as Exports
import Pandora.Pattern.Functor.Divariant as Exports
import Pandora.Pattern.Functor.Comonad as Exports
import Pandora.Pattern.Functor.Monad as Exports
import Pandora.Pattern.Functor.Representable as Exports
import Pandora.Pattern.Functor.Adjoint as Exports
import Pandora.Pattern.Functor.Extendable as Exports
import Pandora.Pattern.Functor.Bindable as Exports
import Pandora.Pattern.Functor.Distributive as Exports
import Pandora.Pattern.Functor.Traversable as Exports
import Pandora.Pattern.Functor.Determinable as Exports
import Pandora.Pattern.Functor.Extractable as Exports
import Pandora.Pattern.Functor.Pointable as Exports
import Pandora.Pattern.Functor.Avoidable as Exports
import Pandora.Pattern.Functor.Applicative as Exports
import Pandora.Pattern.Functor.Alternative as Exports
import Pandora.Pattern.Functor.Invariant as Exports
import Pandora.Pattern.Functor.Contravariant as Exports
import Pandora.Pattern.Functor.Covariant as Exports

import Pandora.Core.Functor (type (:.), type (:=))

(<*+>) :: (Applicative t, Alternative u) => t :. u := a -> t :. u := a -> t :. u := a
(t :. u) := a
x <*+> :: ((t :. u) := a) -> ((t :. u) := a) -> (t :. u) := a
<*+> (t :. u) := a
y = u a -> u a -> u a
forall (t :: * -> *) a. Alternative t => t a -> t a -> t a
(<+>) (u a -> u a -> u a) -> ((t :. u) := a) -> t (u a -> u a)
forall (t :: * -> *) a b. Covariant t => (a -> b) -> t a -> t b
<$> (t :. u) := a
x t (u a -> u a) -> ((t :. u) := a) -> (t :. u) := a
forall (t :: * -> *) a b. Applicative t => t (a -> b) -> t a -> t b
<*> (t :. u) := a
y

(<**+>) :: (Applicative t, Applicative u, Alternative v)
	=> t :. u :. v := a -> t :. u :. v := a -> t :. u :. v := a
(t :. (u :. v)) := a
x <**+> :: ((t :. (u :. v)) := a)
-> ((t :. (u :. v)) := a) -> (t :. (u :. v)) := a
<**+> (t :. (u :. v)) := a
y = v a -> v a -> v a
forall (t :: * -> *) a. Alternative t => t a -> t a -> t a
(<+>) (v a -> v a -> v a)
-> ((t :. (u :. v)) := a) -> (t :. u) := (v a -> v a)
forall (t :: * -> *) (u :: * -> *) a b.
(Covariant t, Covariant u) =>
(a -> b) -> ((t :. u) := a) -> (t :. u) := b
<$$> (t :. (u :. v)) := a
x ((t :. u) := (v a -> v a))
-> ((t :. (u :. v)) := a) -> (t :. (u :. v)) := a
forall (t :: * -> *) (u :: * -> *) a b.
(Applicative t, Applicative u) =>
((t :. u) := (a -> b)) -> ((t :. u) := a) -> (t :. u) := b
<**> (t :. (u :. v)) := a
y

(<***+>) :: (Applicative t, Applicative u, Applicative v, Alternative w)
	=> t :. u :. v :. w := a -> t :. u :. v :. w := a -> t :. u :. v :. w := a
(t :. (u :. (v :. w))) := a
x <***+> :: ((t :. (u :. (v :. w))) := a)
-> ((t :. (u :. (v :. w))) := a) -> (t :. (u :. (v :. w))) := a
<***+> (t :. (u :. (v :. w))) := a
y = w a -> w a -> w a
forall (t :: * -> *) a. Alternative t => t a -> t a -> t a
(<+>) (w a -> w a -> w a)
-> ((t :. (u :. (v :. w))) := a) -> (t :. (u :. v)) := (w a -> w a)
forall (t :: * -> *) (u :: * -> *) (v :: * -> *) a b.
(Covariant t, Covariant u, Covariant v) =>
(a -> b) -> ((t :. (u :. v)) := a) -> (t :. (u :. v)) := b
<$$$> (t :. (u :. (v :. w))) := a
x ((t :. (u :. v)) := (w a -> w a))
-> ((t :. (u :. (v :. w))) := a) -> (t :. (u :. (v :. w))) := a
forall (t :: * -> *) (u :: * -> *) (v :: * -> *) a b.
(Applicative t, Applicative u, Applicative v) =>
((t :. (u :. v)) := (a -> b))
-> ((t :. (u :. v)) := a) -> (t :. (u :. v)) := b
<***> (t :. (u :. (v :. w))) := a
y