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

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

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.1.0, 0.2.0, 0.2.0.1
Change log CHANGELOG.md
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
Maintainer brown.m@pm.me
Category Data, Statistics
Home page https://github.com/mixphix/deep-map
Bug tracker https://github.com/mixphix/deep-map/issues
Uploaded by melaniebrown at 2024-02-12T16:29:36Z
Distributions NixOS:0.2.0.1
Downloads 244 total (20 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-0.2.0.1

[back to package description]

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.