Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data TypeList d
- empty :: TypeList '[]
- index :: forall a d. KnownNat (Index a d) => TypeList d -> Lookup a d
- cons :: forall a d b. b -> TypeList d -> TypeList ('(a, b) ': d)
- (<|) :: forall a d b. b -> TypeList d -> TypeList ('(a, b) ': d)
- snoc :: forall a d b. Last d ~ '(a, b) => TypeList (Init d) -> b -> TypeList d
- (|>) :: forall a d b. Last d ~ '(a, b) => TypeList (Init d) -> b -> TypeList d
- toVector :: TypeList d -> TypeVector d
Documentation
cons :: forall a d b. b -> TypeList d -> TypeList ('(a, b) ': d) infixr 5 Source #
Add an element to the beginning of a list. O(1)
snoc :: forall a d b. Last d ~ '(a, b) => TypeList (Init d) -> b -> TypeList d infixr 5 Source #
Add an element to the end of a list. O(n)
(|>) :: forall a d b. Last d ~ '(a, b) => TypeList (Init d) -> b -> TypeList d infixr 5 Source #
Synonym of snoc
.
toVector :: TypeList d -> TypeVector d Source #
Convert from a list to a vector.