funflow-2.0.0: Make composable workflows
Safe HaskellNone
LanguageHaskell2010

Funflow.Flow

Synopsis

Documentation

type Flow input output = ExtendedFlow '[] input output Source #

Flow is the main type of Funflow. It is a task that takes an input value of type input and produces an output value of type output. It can use any named task (strand) that is defined in RequiredStrands.

type ExtendedFlow additionalStrands input output = forall m. MonadIO m => AnyRopeWith (additionalStrands ++ RequiredStrands) (RequiredCore m) input output Source #

Allows to add other strands on top of the existing strands used by funflow's Flow defined by RequiredStrands. Thoses additional strands should be weaved before passing the resulting loose rope to runFlow. See the advanced tutorial on extending funflow's Flow.

type RequiredStrands = '['("simple", SimpleTask), '("store", StoreTask), '("docker", DockerTask)] Source #

The constraints on the set of "strands" These will be "interpreted" into "core tasks" (which have contraints defined below).

type RequiredCore m = '[Arrow, ArrowChoice, ThrowEffect SomeException, TryEffect SomeException, ThrowEffect StringException, TryEffect StringException, ThrowEffect DockerClientError, TryEffect DockerClientError, HasKleisli m, ProvidesCaching] Source #

The class constraints on the "core task". The "core task" is the task used to run any kind of "binary task" ("strand")

class IsFlow binEff Source #

Allows to register on which strand a binary task should be

Minimal complete definition

toFlow

Instances

Instances details
IsFlow DockerTask Source # 
Instance details

Defined in Funflow.Flow

Methods

toFlow :: DockerTask i o -> Flow i o Source #

IsFlow SimpleTask Source # 
Instance details

Defined in Funflow.Flow

Methods

toFlow :: SimpleTask i o -> Flow i o Source #

IsFlow StoreTask Source # 
Instance details

Defined in Funflow.Flow

Methods

toFlow :: StoreTask i o -> Flow i o Source #

toFlow :: IsFlow binEff => binEff i o -> Flow i o Source #

pureFlow :: (i -> o) -> Flow i o Source #

Make a flow from a pure function

ioFlow :: (i -> IO o) -> Flow i o Source #

Make a flow from an IO monad

dockerFlow :: DockerTaskConfig -> Flow DockerTaskInput Item Source #

Make a flow from the configuration of a Docker task

putDirFlow :: Flow (Path Abs Dir) Item Source #

Make a flow to put a directory into the content store

getDirFlow :: Flow Item (Path Abs Dir) Source #

Make a flow to get the absolute path of the directory storing the data of an item in the content store

throwStringFlow :: Flow String () Source #

Make a flow that throws an exception with a message

returnFlow :: Flow a a Source #

Return a result at the end of a flow