Case distinction on a type-level list.
Modulegenerics-sop-0.5.1.4Haskell2010
Generics.SOP.Sing
- 3 types
- 5 values
- Packagegenerics-sop-0.5.1.4
- Exports8
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceSing.hs
The length of a type-level list.
Paramorphism for a type-level list.
Get hold of an explicit singleton (that one can then pattern match on) for a type-level list
The shape of a type-level list.
Implicit singleton list.
A singleton list can be used to reveal the structure of a type-level list argument that the function is quantified over.
Since 0.4.0.0, this is now defined in terms of All. A singleton list provides a witness for a type-level list where the elements need not satisfy any additional constraints.
Explicit singleton list.
A singleton list can be used to reveal the structure of
a type-level list argument that the function is quantified
over. For every type-level list xs, there is one non-bottom
value of type SList xs.
Note that these singleton lists are polymorphic in the list elements; we do not require a singleton representation for them.
Occasionally it is useful to have an explicit, term-level, representation of type-level lists (esp because of https://ghc.haskell.org/trac/ghc/ticket/9108 )