turbolift.Signature.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of turbolift-core_3 Show documentation
Show all versions of turbolift-core_3 Show documentation
Algebraic Effects for Scala 3
The newest version!
package turbolift
/** Base trait for any user-defined effect signature.
Used to define custom Algebra/Service/DSL.
*
* Example:
* {{{
* import turbolift.Signature
*
* trait GoogleSignature extends Signature:
* def countPicturesOf(topic: String): Int !! ThisEffect
* }}}
*
* See [Defining your own effects and handlers](https://marcinzh.github.io/turbolift/custom/index.html).
*/
trait Signature extends AnyRef:
/**
Self-reference to the effect being described by this [[Signature]].
Becomes an alias of `this.type`, once the signature is inherited from `Effect`.
*/
type ThisEffect