-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Pure heterogeneous maps.
--
-- Pure heterogeneous maps.
@package hetero-map
@version 0.21
module HeteroMap.Map
-- | 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.
data Key x a
-- | Allocate a new key, which is only valid within the passed function
-- (and will be a type error if it tries to escape).
newKey :: (forall x. Key x a -> b) -> b
-- | A heterogeneous map, including keys xs.
data Map xs
empty :: Map Z
singleton :: Key x a -> a -> Map (x :* Z)
insert :: Key x a -> a -> Map xs -> Map (x :* xs)
lookup :: In x xs => Key x a -> Map xs -> a
-- | Same as insert, except does not add the key identifier to the map,
-- instead ensuring that it's already there.
overwrite :: In x xs => Key x a -> a -> Map xs -> Map xs
instance [incoherent] In x xs => In x (y :* xs)
instance [incoherent] In x (x :* xs)