| Copyright | Copyright (C) 2015 Kyle Carter |
|---|---|
| License | BSD3 |
| Maintainer | Kyle Carter <kylcarte@indiana.edu> |
| Stability | experimental |
| Portability | RankNTypes |
| Safe Haskell | None |
| Language | Haskell2010 |
Type.Family.List
Description
Convenient aliases and type families for working with type-level lists.
- type Ø = `[]`
- type (:<) = (:)
- type Only a = `[a]`
- type family as ++ bs :: [k]
- type family as >: a :: [k]
- type family Reverse as :: [k]
- type family Init' a as :: [k]
- type family Last' a as :: k
- type family ListC cs :: Constraint
- type family f <$> a :: [l]
- type family f <&> a :: [l]
- type family f <*> a :: [l]
- (==) :: Eq a => a -> a -> Bool
Documentation
type family ListC cs :: Constraint Source
Takes a type-level list of Constraints to a single
Constraint, where ListC cs holds iff all elements
of cs hold.
type family f <$> a :: [l] infixr 4 Source
Map an (f :: k -> l) over a type-level list (as :: [k]),
giving a list (bs :: [l]).
type family f <&> a :: [l] infixl 5 Source
Map a list of (fs :: [k -> l]) over a single (a :: k),
giving a list (bs :: [l]).