libretto.lambda.EnumModule
See theEnumModule companion object
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Type members
Classlikes
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Types
Witnesses that Cases
is a list of cases, usable in Enum
, i.e. that Cases
is of the form (Name1 :: T1) || ... || (NameN :: TN)
.
Witnesses that Cases
is a list of cases, usable in Enum
, i.e. that Cases
is of the form (Name1 :: T1) || ... || (NameN :: TN)
.
Attributes
type Partitioning[Cases] <: Partitioning[->, **, Enum[Cases]] { type Partition = [P] =>> EnumPartition[Cases, P]; }
Value members
Abstract methods
def isLastCase[Init, Lbl <: String, Z](label: Lbl): IsCaseOf[Lbl, Init || (Lbl :: Z)] { type Type = Z; }
Concrete methods
def extractorOf[T, Cases](p: Partitioning[->, **, T] { type Partition = [P] =>> EnumPartition[Cases, P]; })(label: String)(using ev: IsCaseOf[label.type, Cases]): Extractor[->, **, T, ev.Type]
Givens
Givens
given distFSingle[F[_], Lbl <: String, A](using label: StaticValue[Lbl]): distr.DistF[F, Lbl :: A] { type Out = Lbl :: F[A]; }
given distFSnoc[F[_], Init, Label <: String, Z](using init: distr.DistF[F, Init], label: StaticValue[Label]): distr.DistF[F, Init || (Label :: Z)] { type Out = init.Out || (Label :: F[Z]); }
given isInitCase[Lbl, Init, ZLbl, Z](using j: IsCaseOf[Lbl, Init]): IsCaseOf[Lbl, Init || (ZLbl :: Z)] { type Type = j.Type; }
given isLastCase[Init, Lbl <: String, Z](using label: StaticValue[Lbl]): IsCaseOf[Lbl, Init || (Lbl :: Z)] { type Type = Z; }
given isSingleCase[Lbl <: String, A](using label: StaticValue[Lbl]): IsCaseOf[Lbl, Lbl :: A] { type Type = A; }
Extensions
Extensions
extension [Cases](p: Partitioning[Cases])
In this article