ValSwitch

libretto.scaletto.Scaletto.ValSwitch
See theValSwitch companion object
class ValSwitch[A, A0, R](a: $[Val[A]], pos: SourcePos, cases: Cases[A, A0, R])(using x$4: LambdaContext)

Type parameters

A

type of the scrutinee (the value to match on)

A0

subtype of A covered so far

R

result type that each case must produce

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def Case[A1 <: A](using tt: TypeTest[A, A1], pos: SourcePos)(f: LambdaContext ?=> $[Val[A1]] => $[R]): ValSwitch[A, A0 | A1, R]
def endswitch(using ev: A0 =:= A): $[R]