Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Flow input output = ExtendedFlow '[] input output
- type ExtendedFlow additionalStrands input output = forall m. MonadIO m => AnyRopeWith (additionalStrands ++ RequiredStrands) (RequiredCore m) input output
- type RequiredStrands = '['("simple", SimpleTask), '("store", StoreTask), '("docker", DockerTask)]
- type RequiredCore m = '[Arrow, ArrowChoice, ThrowEffect SomeException, TryEffect SomeException, ThrowEffect StringException, TryEffect StringException, ThrowEffect DockerClientError, TryEffect DockerClientError, HasKleisli m, ProvidesCaching]
- class IsFlow binEff
- toFlow :: IsFlow binEff => binEff i o -> Flow i o
- pureFlow :: (i -> o) -> Flow i o
- ioFlow :: (i -> IO o) -> Flow i o
- dockerFlow :: DockerTaskConfig -> Flow DockerTaskInput Item
- putDirFlow :: Flow (Path Abs Dir) Item
- getDirFlow :: Flow Item (Path Abs Dir)
- throwStringFlow :: Flow String ()
- returnFlow :: Flow a a
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")
Allows to register on which strand a binary task should be
Instances
IsFlow DockerTask Source # | |
Defined in Funflow.Flow toFlow :: DockerTask i o -> Flow i o Source # | |
IsFlow SimpleTask Source # | |
Defined in Funflow.Flow toFlow :: SimpleTask i o -> Flow i o Source # | |
IsFlow StoreTask Source # | |
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