Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | Nicola Squartini <tensor5@gmail.com> |
Safe Haskell | Safe-Inferred |
The Module Data.TypeList
is a collection of classes to manipulate lists
of types, a.k.a. heterogeneous lists. Check the module
Data.TypeList.MultiIndex
for a concrete implementation of
.
TypeList
- class TypeList l where
- class TypeList l => HeadTail l where
- class Component l n where
- class (TypeList l, TypeList l') => AppendList l l' where
- class (Cardinal n, TypeList l) => TakeList n l where
- class (Cardinal n, TypeList l) => DropList n l where
- class (TypeList l, TypeList l') => TailRevList l l' where
- class TypeList l => ReverseList l where
- class JoinList n l l' where
- class Extend l l' where
Documentation
Every
has a TypeList
. The Length
is actually a
type, and should be a Length
(see Cardinal
Data.Cardinal
).
class Component l n whereSource
Extracts the n
-th component of the list l
class (TypeList l, TypeList l') => AppendList l l' whereSource
TypeList l => AppendList Nil l | |
AppendList l l' => AppendList (:|: e l) l' |
class (TypeList l, TypeList l') => TailRevList l l' whereSource
Reverse l
and append it in front of l'
.
TypeList l => TailRevList Nil l | |
(TailRevList l (:|: e l'), TypeList l') => TailRevList (:|: e l) l' |
class TypeList l => ReverseList l whereSource
ReverseList Nil | |
(TailRevList l Nil, TailRevList (:|: e l) Nil) => ReverseList (:|: e l) |