Copyright | Copyright (C) 2015 Kyle Carter |
---|---|

License | BSD3 |

Maintainer | Kyle Carter <kylcarte@indiana.edu> |

Stability | experimental |

Portability | RankNTypes |

Safe Haskell | None |

Language | Haskell2010 |

Convenient aliases and type families for working with type-level lists.

- type Ø = '[]
- type (:<) = (:)
- type Only a = '[a]
- type family Null (as :: [k]) :: Bool where ...
- nullCong :: (a ~ b) :- (Null a ~ Null b)
- nilNotCons :: (Ø ~ (a :< as)) :- Fail
- type family (as :: [k]) ++ (bs :: [k]) :: [k] where ...
- appendCong :: (a ~ b, c ~ d) :- ((a ++ c) ~ (b ++ d))
- type family Concat (ls :: [[k]]) :: [k] where ...
- concatCong :: (as ~ bs) :- (Concat as ~ Concat bs)
- type family (as :: [k]) >: (a :: k) :: [k] where ...
- snocCong :: (as ~ bs, a ~ b) :- ((as >: a) ~ (bs >: b))
- type family Reverse (as :: [k]) :: [k] where ...
- reverseCong :: (as ~ bs) :- (Reverse as ~ Reverse bs)
- type family HeadM (as :: [k]) :: Maybe k where ...
- type family Head (as :: [k]) :: k where ...
- type family TailM (as :: [k]) :: Maybe [k] where ...
- type family Tail (as :: [k]) :: [k] where ...
- type family InitM (as :: [k]) :: Maybe [k] where ...
- type family Init (as :: [k]) :: [k] where ...
- type family Init' (a :: k) (as :: [k]) :: [k] where ...
- initCong :: (a ~ b, as ~ bs) :- (Init' a as ~ Init' b bs)
- type family LastM (as :: [k]) :: Maybe k where ...
- type family Last (as :: [k]) :: k where ...
- type family Last' (a :: k) (as :: [k]) :: k where ...
- lastCong :: (a ~ b, as ~ bs) :- (Last' a as ~ Last' b bs)
- type family ListC (cs :: [Constraint]) = (c :: Constraint) | c -> cs where ...
- type family (f :: k -> l) <$> (a :: [k]) :: [l] where ...
- listMapCong :: (f ~ g, as ~ bs) :- ((f <$> as) ~ (g <$> bs))
- type family (f :: [k -> l]) <&> (a :: k) :: [l] where ...
- type family (f :: [k -> l]) <*> (a :: [k]) :: [l] where ...
- type family Fsts (ps :: [(k, l)]) :: [k] where ...
- type family Snds (ps :: [(k, l)]) :: [l] where ...
- type family Zip (as :: [k]) (bs :: [l]) = (cs :: [(k, l)]) | cs -> as bs where ...
- type family Fsts3 (ps :: [(k, l, m)]) :: [k] where ...
- type family Snds3 (ps :: [(k, l, m)]) :: [l] where ...
- type family Thds3 (ps :: [(k, l, m)]) :: [m] where ...

# Documentation

type family (as :: [k]) ++ (bs :: [k]) :: [k] where ... infixr 5 Source #

Appends two type-level lists.

type family ListC (cs :: [Constraint]) = (c :: Constraint) | c -> cs where ... Source #

Takes a type-level list of `Constraint`

s to a single
`Constraint`

, where `ListC cs`

holds iff all elements
of `cs`

hold.

type family (f :: k -> l) <$> (a :: [k]) :: [l] where ... infixr 4 Source #

Map an `(f :: k -> l)`

over a type-level list `(as :: [k])`

,
giving a list `(bs :: [l])`

.

type family (f :: [k -> l]) <&> (a :: k) :: [l] where ... infixl 5 Source #

Map a list of `(fs :: [k -> l])`

over a single `(a :: k)`

,
giving a list `(bs :: [l])`

.