diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2018-01-07 21:51:22 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2018-01-07 21:51:22 +0100 |
commit | 6b620da09b9f05699c1cf6080de229e63de47942 (patch) | |
tree | d3061b37b98c228f0c2be18c171f9d911b0dca7a /core/lib/FiberTypes.scala |
Add initial code and project files.
Diffstat (limited to 'core/lib/FiberTypes.scala')
-rw-r--r-- | core/lib/FiberTypes.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/core/lib/FiberTypes.scala b/core/lib/FiberTypes.scala new file mode 100644 index 0000000..35f6a42 --- /dev/null +++ b/core/lib/FiberTypes.scala @@ -0,0 +1,19 @@ +package eu.mulk.fibers + +import scala.language.implicitConversions +import scala.util.continuations.cpsParam + +private[fibers] trait FiberTypes { + type Effect[_] + + /** + * Annotates a computation as a fiber. + * + * Annotate the return type of a fibrational function with this type + * annotator. + * + * @tparam Out the type of objects [[Fiber.emit]]ted by the fiber. + * @see [[Fiber.run]] + */ + type fiber[Out] = cpsParam[Any, (Effect[Out], Any ⇒ Any)] +} |