package script
- Alphabetic
- Public
- All
Type Members
- trait ScriptDsl[F[+_]] extends AnyRef
-
case class
ScriptT[F[+_], -D, +E, +A](definition: Definition[F, D, E, A]) extends ScriptDsl[F] with Product with Serializable
This represents a program with dependencies D, domain failures E, and which produces an A, while side effects should be handled by F.
This represents a program with dependencies D, domain failures E, and which produces an A, while side effects should be handled by F. Also it accumulates logging.
One may see this data type as a handcrafted
ReaderT[WriterT[EitherT[F, E, ?], LogLine], D, A]
or a way to compose functions with this signature:D => F[(List[LogLine], Either[E, A])]
Use functions provided by the ScriptDSL type class to create and compose Script programs.
Note that domain failures are supposed to model what can possible go wrong within the domain of the function, lower level exceptions (like network failure) should be handled within the F[_] that the function
run
returns.- F
should be a monad that handles async, like Future, IO, Task, or Streams.
- D
dependencies of the program.
- E
domain failures of the program.
- A
value that the program produces.
- definition
function.