- 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)
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
Allocate a new key, which is only valid within the passed function (and will be a type error if it tries to escape).
Same as insert, except does not add the key identifier to the map, instead ensuring that it's already there.