deep-map: Deeply-nested, multiple key type maps.

[ bsd3, data, library, statistics ] [ Propose Tags ]


[Index] [Quick Jump]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS],, 0.2.0,
Change log
Dependencies base (>=4.11 && <5), containers (>=0.5.11 && <0.7), indexed-traversable (>=0.1.2 && <0.2) [details]
License BSD-3-Clause
Copyright 2021-2024 Melanie Brown
Author Melanie Brown
Category Data, Statistics
Home page
Bug tracker
Uploaded by melaniebrown at 2024-02-12T16:29:36Z
Distributions NixOS:
Downloads 283 total (13 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2024-02-12 [all 1 reports]

Readme for deep-map-

[back to package description]


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.