remote-monad-0.2: An parametrizable Remote Monad, and parametrizable Applicative Functor

Copyright(C) 2016, The University of Kansas
LicenseBSD-style (see the file LICENSE)
MaintainerAndy Gill
StabilityAlpha
PortabilityGHC
Safe HaskellSafe
LanguageHaskell2010

Control.Remote.Applicative

Contents

Description

 

Synopsis

The remote applicative

data RemoteApplicative c p a Source

RemoteApplicative is our applicative that can be executed in a remote location.

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.

Methods

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.