Description
Deeply-nested, multiple key type maps.
Description
Please see the README at https://github.com/mixphix/deep-map
README.md
deep-map
A DeepMap
is a map that has several layers of keys.
type DeepMap :: [Type] -> Type -> Type
data DeepMap ks v where
Bare :: v -> DeepMap '[] v
Nest :: Map k (DeepMap ks v) -> DeepMap (k ': ks) v
For a given (k ': ks) :: [Type]
, the type DeepMap (k ': ks) v
is isomorphic to lists of the form [(k, k0, .., kn, v)]
where ks = '[k0, ..., kn]
, but with better performance.