Member

libretto.lambda.Member
See theMember companion object
sealed trait Member[||[_, _], ::[_, _], Label, A, Cases]

Witnesses that Label :: A is one of Cases, where Cases is of the form (lbl1 :: A1) || (lbl2 :: A2) || ... (where || associates to the left).

Similar to TupleElem, but for named members. Unlike TupleElem, Member does not need a special "Nil" type to mark the end of the members list: there is no ambiguity in Enum["foo" :: (Bar || Baz)] — it is unambiguously a single-member Enum.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class InInit[||, ::, Label, A, Init, BLbl, B]
class InLast[||, ::, Init, Label, A]
class Single[||, ::, Label, A]

Members list

Type members

Types

final type Type = A

Value members

Abstract methods

def label: Label & String
infix def testEqual[Lbl2, B](that: Member[||, ::, Lbl2, B, Cases])(using BiInjective[||], BiInjective[::]): Option[A =:= B]

Concrete methods

def inInit[BLbl, B]: Member[||, ::, Label, A, Cases || (BLbl :: B)]