{-# LANGUAGE EmptyCase, UndecidableSuperClasses #-} module Control.Subcategory.Applicative.Class (CApplicative(..)) where import Control.Subcategory.Functor import qualified Control.Applicative as App infixl 4 <.> class CFunctor f => CApplicative f where pair :: (Dom f a, Dom f b, Dom f (a, b)) => f a -> f b -> f (a, b) default pair :: (Applicative f) => f a -> f b -> f (a, b) pair = forall (f :: * -> *) a b c. Applicative f => (a -> b -> c) -> f a -> f b -> f c App.liftA2 (,) (<.>) :: (Dom f a, Dom f b, Dom f (a -> b)) => f (a -> b) -> f a -> f b default (<.>) :: (Applicative f) => f (a -> b) -> f a -> f b (<.>) = forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b (<*>) (.>) :: (Dom f a, Dom f b) => f a -> f b -> f b default (.>) :: Applicative f => f a -> f b -> f b (.>) = forall (f :: * -> *) a b. Applicative f => f a -> f b -> f b (*>) (<.) :: (Dom f a, Dom f b) => f a -> f b -> f a default (<.) :: Applicative f => f a -> f b -> f a (<.) = forall (f :: * -> *) a b. Applicative f => f a -> f b -> f a (<*)