Portability | GHC |
---|---|
Stability | experimental |
Maintainer | emw4@rice.edu |
Vectors indexed by a type list
- data MapC f c where
- empty :: MapC f Nil
- singleton :: f a -> MapC f (Nil :> a)
- lookup :: Member c a -> MapC f c -> f a
- mapC :: (forall x. f x -> g x) -> MapC f c -> MapC g c
- append :: MapC f c1 -> MapC f c2 -> MapC f (c1 :++: c2)
- mkAppend :: MapC f c2 -> Append c1 c2 (c1 :++: c2)
- mkMonoAppend :: Proxy c1 -> MapC f c2 -> Append c1 c2 (c1 :++: c2)
- split :: Append c1 c2 c -> MapC f c -> (MapC f c1, MapC f c2)
- proxy :: MapC f c -> Proxy c
- members :: MapC f c -> MapC (Member c) c
Documentation
A MapC f c
is a vector with exactly one element of type f a
for
each type a
in the type list c
.
mapC :: (forall x. f x -> g x) -> MapC f c -> MapC g cSource
Map a function to all elements of a MapC
vector.