Dsl

@implicitNotFound("The keyword:\n ${Keyword}\nis not supported inside a function that returns:\n${Domain}.")
trait Dsl[-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
class Object
trait Matchable
class Any

Value members

Abstract 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.