- data Key x a
- newKey :: (forall x. Key x a -> b) -> b
- data Map xs
- empty :: Map ()
- singleton :: Key x a -> a -> Map (x, ())
- insert :: Key x a -> a -> Map xs -> Map (x, xs)
- lookup :: In x xs => Key x a -> Map xs -> a
- overwrite :: In x xs => Key x a -> a -> Map xs -> Map xs
- union :: Map xs -> Map ys -> Map (Union xs ys)
Documentation
A Key in a heterogeneous map. x
is the key identifier type,
which ensures that we don't look up a key in a map that doesn't
have it.
newKey :: (forall x. Key x a -> b) -> bSource
Allocate a new key, which is only valid within the passed function (and will be a type error if it tries to escape).