Copyright | (C) 2016, The University of Kansas |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Andy Gill |
Stability | Alpha |
Portability | GHC |
Safe Haskell | Safe |
Language | Haskell2010 |
- data RemoteApplicative c p a
- command :: c -> RemoteApplicative c p ()
- procedure :: p a -> RemoteApplicative c p a
- class RunApplicative f where
- runApplicative :: Monad m => (f c p :~> m) -> RemoteApplicative c p :~> m
- runWeakApplicative :: forall m c p. Applicative m => (WeakPacket c p :~> m) -> RemoteApplicative c p :~> m
- runStrongApplicative :: forall m c p. Monad m => (StrongPacket c p :~> m) -> RemoteApplicative c p :~> m
- runApplicativeApplicative :: (ApplicativePacket c p :~> m) -> RemoteApplicative c p :~> m
The remote applicative
data RemoteApplicative c p a Source
RemoteApplicative
is our applicative that can be executed in a remote location.
Functor (RemoteApplicative c p) Source | |
Applicative (RemoteApplicative c p) Source |
The primitive lift functions
command :: c -> RemoteApplicative c p () Source
promote a command into the applicative
procedure :: p a -> RemoteApplicative c p a Source
promote a command into the applicative
The run functions
class RunApplicative f where Source
RunApplicative
is the overloading for choosing the appropriate bundling strategy for applicative.
runApplicative :: Monad m => (f c p :~> m) -> RemoteApplicative c p :~> m Source
This overloaded function chooses the appropriate bundling strategy based on the type of the handler your provide.
runWeakApplicative :: forall m c p. Applicative m => (WeakPacket c p :~> m) -> RemoteApplicative c p :~> m Source
The weak remote applicative, that sends commands and procedures piecemeal.
runStrongApplicative :: forall m c p. Monad m => (StrongPacket c p :~> m) -> RemoteApplicative c p :~> m Source
The strong remote applicative, that bundles together commands.
runApplicativeApplicative :: (ApplicativePacket c p :~> m) -> RemoteApplicative c p :~> m Source
The applicative remote applicative, that is the identity function.