https://github.com/lysxia/type-map
Type-indexed maps, or a lightweight record library
https://github.com/lysxia/type-map
Last synced: 3 months ago
JSON representation
Type-indexed maps, or a lightweight record library
- Host: GitHub
- URL: https://github.com/lysxia/type-map
- Owner: Lysxia
- License: mit
- Created: 2017-04-02T17:03:47.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-01-05T15:44:33.000Z (over 4 years ago)
- Last Synced: 2024-04-26T01:02:26.682Z (about 2 years ago)
- Language: Haskell
- Homepage: https://hackage.haskell.org/package/type-map
- Size: 63.5 KB
- Stars: 5
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Type-indexed maps [](https://hackage.haskell.org/package/type-map) [](https://github.com/Lysxia/type-map/actions)
=================
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`);
Supports arbitrary, user-defined mappings between keys and
types of values via defunctionalization.
- a static type map, whose type is indexed by its list of keys
(there are actually multiple implementations with different underlying
representations (`[]`, `Map`, `Vector`)).
[Example using the dynamically-typed
interface](https://github.com/Lysxia/type-map/tree/master/examples/dynamic.hs).
See also [this package's description on Hackage](https://hackage.haskell.org/package/type-map).
Related
-------
- [typerep-map](https://hackage.haskell.org/package/typerep-map),
a more performant dynamic type map.
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.