Items1Named
Data types for working with non-empty heterogeneous lists of named items of the form
"name1" :: T1 || ... || "nameN" :: Tn
where ||
is the separator of items (associates to the left) and ::
represents a type annotation.
Analogous to Items1, except for named items.
Unlike Items1, no special "Nil
" type (list terminator) is needed, as there is no ambiguity:
"x" :: (A || B)
is unambiguously a single-item list;"x" :: A || "y" :: B
is unambiguously a two-item list.
whereas in unnamed version without Nil
terminator, both cases above would reduce A || B
. (NB: With Nil
terminator, they reduce to two distinct types. Nil || (A || B)
and (Nil || A) || B
, respectively.)
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Items1Named.type
Members list
Type members
Classlikes
Witnesses that Label :: A
is one of Cases
, where Cases
is of the form (lbl1 :: A1) || (lbl2 :: A2) || ...
(where ||
associates to the left).
Witnesses that Label :: A
is one of Cases
, where Cases
is of the form (lbl1 :: A1) || (lbl2 :: A2) || ...
(where ||
associates to the left).
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Holds F[K, V]
for K :: V
one of Cases
, where Cases
is of the form (K1 :: V1) || (K2 :: V2) || ...
(where ||
associates to the left).
Holds F[K, V]
for K :: V
one of Cases
, where Cases
is of the form (K1 :: V1) || (K2 :: V2) || ...
(where ||
associates to the left).
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
A data type that holds all items of the Items`` list, each wrapped in
F[_]`.
A data type that holds all items of the Items`` list, each wrapped in
F[_]`.
In other words, an n-ary tuple of named values F[Ai]
, where Items = "name1" :: A1 || ... || "nameN" :: An
, where ||
associates to the left.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Witnesses that Items
is a list of name :: type
pairs, i.e. that Items
is of the form (Name1 :: T1) || ... || (NameN :: TN)
.