3
4[](https://hackage.haskell.org/package/typerep-map)
5[](https://travis-ci.org/kowainik/typerep-map)
6[](https://github.com/vrom911/typerep-map/blob/master/LICENSE)
8`typerep-map` introduces `TMap` and `TypeRepMap` — data structures like [`Map`](http://hackage.haskell.org/package/containers-0.6.0.1/docs/Data-Map-Lazy.html#t:Map), but where types serve as keys, and values have the types specified in the corresponding key spots.
10For the more details on the implementation see [this blog post](https://kowainik.github.io/posts/2018-07-11-typerep-map-step-by-step.html).
17ghci> tm = insert True $ one (42 :: Int)
27ghci> res :: Maybe Bool
30ghci> res :: Maybe String
33ghci> lookup (insert "hello" tm) :: Maybe String
39ghci> tm' = delete @Int tm
47Tables below contain comparision with `DMap TypeRep` of ten `lookup` operations
48on structure with size `10^4`:
50| | ghc-8.2.2 | ghc-8.4.3 |
51|----------------|-----------|-----------|
52| `DMap TypeRep` | 517.5 ns | 779.9 ns |
53| `typerep-map` | 205.3 ns | 187.2 ns |
56:---------:|:-----------:
57 | 
58 | 
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list