Algebra

doodle.algebra.Algebra
See theAlgebra companion object
trait Algebra

Base type for algebras that produce results in some effect type Drawing. Users of algebras should use dependent method types (or dependent function types in Scala 3) to return the Drawing type of the method they are passed:

def usingAlgebra(algebra: Algebra): algebra.Drawing = ???

All Drawing types are required to implement Monad

Attributes

Companion
object
Source
Algebra.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Bitmap
trait Blend
trait Debug
trait GenericDebug[G]
trait Basic
trait Layout
trait GenericLayout[G]
trait Path
trait GenericPath[G]
trait Shape
trait GenericShape[G]
trait Size
trait GenericSize[G]
trait Style
trait GenericStyle[G]
trait Text
trait GenericText[G]
trait Transform
trait GenericTransform[G]
Show all

Members list

Type members

Types

type Drawing[_]

The effect type that methods on this algebra produce. Represents an effect that, when run, will draw something and produce a value.

The effect type that methods on this algebra produce. Represents an effect that, when run, will draw something and produce a value.

Attributes

Source
Algebra.scala

Implicits

Implicits

implicit val drawingInstance: Monad[Drawing]

Attributes

Source
Algebra.scala