module Control.Applicative.Static where
import Data.Functor.Static
import Control.Distributed.Closure
import Data.Typeable (Typeable)
class StaticFunctor f => StaticApply f where
staticApply
:: (Typeable a, Typeable b)
=> f (a -> b)
-> f a
-> f b
class StaticApply f => StaticApplicative f where
staticPure :: Typeable a => Closure a -> f a
instance StaticApply Closure where
staticApply :: forall a b.
(Typeable a, Typeable b) =>
Closure (a -> b) -> Closure a -> Closure b
staticApply = forall a b.
Typeable a =>
Closure (a -> b) -> Closure a -> Closure b
cap
instance StaticApplicative Closure where
staticPure :: forall a. Typeable a => Closure a -> Closure a
staticPure = forall a. a -> a
id