Skip to content
MasterWordServicesPublic
forked from mixphix/deep-map

About

Deeply nested, multiple key-type maps.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

deep-map

ci Hackage license

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.

About

Deeply nested, multiple key-type maps.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages