Dsl

@implicitNotFound("The keyword:\n ${Keyword}\nis not supported inside a function that returns:\n${Domain}.")
trait Dsl[-Keyword, Domain, +Value] extends PolyCont[Keyword, Domain, Value]

The domain-specific interpreter for Keyword in Domain, which is a dependent type type class that registers an asynchronous callback function, to handle the Value inside Keyword.

Type Params
Value

The value held inside Keyword.

Authors

杨博 (Yang Bo)

Example

Creating a collaborative DSL in Dsl.scala is easy. Only two steps are required:

  • Defining their domain-specific Keyword.
  • Implementing this Dsl type class, which is an interpreter for an Keyword.
Companion
object
trait PolyCont[Keyword, Domain, Value]
class Object
trait Matchable
class Any
class ScalazTransformerDsl[F, G, A, B]
trait StackSafeShiftDsl[Domain, NewDomain, Value]

Value members

Inherited methods

def cpsApply(keyword: Keyword, handler: Value => Domain): Domain

Registers an asynchronous callback handler on keyword, to handle the Value.

Registers an asynchronous callback handler on keyword, to handle the Value.

Inherited from
PolyCont