distributed-dataset-0.0.1.0: A distributed data processing framework in pure Haskell

Safe HaskellNone
LanguageHaskell2010

Control.Distributed.Fork.Backend

Contents

Description

You only need this module if you want to create a new backend for distributed-dataset.

See localProcessBackend for a minimal example.

Synopsis

Writing a Backend.

newtype Backend #

Backend is responsible for running your functions in a remote environment.

See:

Constructors

Backend 

Fields

  • bExecute :: ByteString -> BackendM ByteString

    Should run the current binary in the target environment, put the given string as standard input and return the executables answer on the standard output.

data BackendM a #

BackendM is essentially IO, but also has the ability to report the status of the executor.

Instances
Monad BackendM # 
Instance details

Defined in Control.Distributed.Fork.Internal

Methods

(>>=) :: BackendM a -> (a -> BackendM b) -> BackendM b #

(>>) :: BackendM a -> BackendM b -> BackendM b #

return :: a -> BackendM a #

fail :: String -> BackendM a #

Functor BackendM # 
Instance details

Defined in Control.Distributed.Fork.Internal

Methods

fmap :: (a -> b) -> BackendM a -> BackendM b #

(<$) :: a -> BackendM b -> BackendM a #

Applicative BackendM # 
Instance details

Defined in Control.Distributed.Fork.Internal

Methods

pure :: a -> BackendM a #

(<*>) :: BackendM (a -> b) -> BackendM a -> BackendM b #

liftA2 :: (a -> b -> c) -> BackendM a -> BackendM b -> BackendM c #

(*>) :: BackendM a -> BackendM b -> BackendM b #

(<*) :: BackendM a -> BackendM b -> BackendM a #

MonadIO BackendM # 
Instance details

Defined in Control.Distributed.Fork.Internal

Methods

liftIO :: IO a -> BackendM a #

MonadUnliftIO BackendM # 
Instance details

Defined in Control.Distributed.Fork.Internal

Methods

askUnliftIO :: BackendM (UnliftIO BackendM) #

withRunInIO :: ((forall a. BackendM a -> IO a) -> IO b) -> BackendM b #

MonadThrow BackendM # 
Instance details

Defined in Control.Distributed.Fork.Internal

Methods

throwM :: Exception e => e -> BackendM a #

MonadCatch BackendM # 
Instance details

Defined in Control.Distributed.Fork.Internal

Methods

catch :: Exception e => BackendM a -> (e -> BackendM a) -> BackendM a #

MonadMask BackendM # 
Instance details

Defined in Control.Distributed.Fork.Internal

Methods

mask :: ((forall a. BackendM a -> BackendM a) -> BackendM b) -> BackendM b #

uninterruptibleMask :: ((forall a. BackendM a -> BackendM a) -> BackendM b) -> BackendM b #

generalBracket :: BackendM a -> (a -> ExitCase b -> BackendM c) -> (a -> BackendM b) -> BackendM (b, c) #

argExecutorMode :: String #

We switch to executor mode only when argv[1] == argExecutorMode.

Reporting status

data ExecutorFinalStatus a #

Instances
Functor ExecutorFinalStatus # 
Instance details

Defined in Control.Distributed.Fork.Internal

Eq a => Eq (ExecutorFinalStatus a) # 
Instance details

Defined in Control.Distributed.Fork.Internal

Generic (ExecutorFinalStatus a) # 
Instance details

Defined in Control.Distributed.Fork.Internal

Associated Types

type Rep (ExecutorFinalStatus a) :: Type -> Type #

Binary a => Binary (ExecutorFinalStatus a) # 
Instance details

Defined in Control.Distributed.Fork.Internal

type Rep (ExecutorFinalStatus a) # 
Instance details

Defined in Control.Distributed.Fork.Internal

type Rep (ExecutorFinalStatus a) = D1 (MetaData "ExecutorFinalStatus" "Control.Distributed.Fork.Internal" "distributed-dataset-0.0.1.0-5UE6bzbZnS1IskgQw7GtXe" False) (C1 (MetaCons "ExecutorFailed" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)) :+: C1 (MetaCons "ExecutorSucceeded" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))

Utils

Re-exports

liftIO :: MonadIO m => IO a -> m a #

Lift a computation from the IO monad.

getExecutablePath :: IO FilePath #

Returns the absolute pathname of the current executable.

Note that for scripts and interactive sessions, this is the path to the interpreter (e.g. ghci.)

Since base 4.11.0.0, getExecutablePath resolves symlinks on Windows. If an executable is launched through a symlink, getExecutablePath returns the absolute path of the original executable.

Since: base-4.6.0.0