aboutsummaryrefslogtreecommitdiff
path: root/core/lib/FiberTypes.scala
blob: 4f438d8aecaa4968b0a5182be55acdd9a8ea3763 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package eu.mulk.fibers

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)]
}