type-map: Type-indexed maps

[ data, library, mit ] [ Propose Tags ]

Maps where keys are types and values can have types depending on their keys.


[Skip to Readme]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.1.0, 0.1.2.0, 0.1.3.0, 0.1.4.0, 0.1.5.0, 0.1.6.0, 0.1.7.0
Change log CHANGELOG.md
Dependencies base (>=4.7 && <4.15), containers, ghc-prim, vector [details]
License MIT
Copyright 2017 Li-yao Xia
Author Li-yao Xia
Maintainer lysxia@gmail.com
Revised Revision 1 made by lyxia at 2022-01-05T15:39:47Z
Category Data
Home page https://github.com/Lysxia/type-map
Bug tracker https://github.com/Lysxia/type-map/issues
Source repo head: git clone https://github.com/Lysxia/type-map
Uploaded by lyxia at 2018-12-20T15:13:57Z
Distributions LTSHaskell:0.1.7.0, NixOS:0.1.7.0, Stackage:0.1.7.0
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 4222 total (31 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-12-20 [all 1 reports]

Readme for type-map-0.1.4.0

[back to package description]

Type-indexed maps Hackage Build Status

Maps whose keys are types.

This package includes:

  • a dynamic type map using GHC's Typeable class, with a Proxy-based API (Data.TypeMap.Dynamic) or a TypeApplications-based API (Data.TypeMap.Dynamic.Alt);

  • a static type map, whose type is indexed by its list of keys (there are actually multiple implementations with different underlying representations ([], Map, Vector)).

Both variants support arbitrary, user-defined mappings between types and values, via defunctionalization.

Example using the dynamically-typed interface.

See also this package's description on Hackage.

Internal module policy

Modules under Data.TypeMap.Internal are not subject to any versioning policy. Breaking changes may apply to them at any time.

If something in those modules seems useful, please report it or create a pull request to export it from an external module.