typerep-map alternatives and similar packages
Based on the "Data" category.
Alternatively, view typerep-map alternatives based on common mentions on social networks and blogs.
-
lens
Lenses, Folds, and Traversals - Join us on web.libera.chat #haskell-lens -
semantic-source
Parsing, analyzing, and comparing source code across many languages -
text
Haskell library for space- and time-efficient operations over Unicode text. -
code-builder
Packages for defining APIs, running them, generating client code and documentation. -
cassava
A CSV parsing and encoding library optimized for ease of use and high performance -
unordered-containers
Efficient hashing-based container types -
compendium-client
Mu (μ) is a purely functional framework for building micro services. -
holmes
A reference library for constraint-solving with propagators and CDCL. -
binary
Efficient, pure binary serialisation using ByteStrings in Haskell. -
primitive
This package provides various primitive memory-related operations. -
resource-pool
A high-performance striped resource pooling implementation for Haskell -
discrimination
Fast linear time sorting and discrimination for a large class of data types -
IORefCAS
A collection of different packages for CAS based data structures. -
reflection
Reifies arbitrary Haskell terms into types that can be reflected back into terms -
dependent-sum
Dependent sums and supporting typeclasses for comparing and displaying them -
dependent-map
Dependently-typed finite maps (partial dependent products) -
audiovisual
Extensible records, variants, structs, effects, tangles -
text-icu
This package provides the Haskell Data.Text.ICU library, for performing complex manipulation of Unicode text. -
orgmode-parse
Attoparsec parser combinators for parsing org-mode structured text! -
streaming
An optimized general monad transformer for streaming applications, with a simple prelude of functions -
safecopy
An extension to Data.Serialize with built-in version control -
uuid-types
A Haskell library for creating, printing and parsing UUIDs -
scientific
Arbitrary-precision floating-point numbers represented using scientific notation
Clean code begins in your IDE with SonarLint
Do you think we are missing an alternative of typerep-map or a related project?
README
typerep-map
typerep-map
introduces TMap
and TypeRepMap
— data structures like Map
, but where types serve as keys, and values have the types specified in the corresponding key spots.
For the more details on the implementation see the following blog post:
Usage example
ghci> import Data.TMap
ghci> tm = insert True $ one (42 :: Int)
ghci> size tm
2
ghci> res = lookup tm
ghci> res :: Maybe Int
Just 42
ghci> res :: Maybe Bool
Just True
ghci> res :: Maybe String
Nothing
ghci> lookup (insert "hello" tm) :: Maybe String
Just "hello"
ghci> member @Int tm
True
ghci> tm' = delete @Int tm
ghci> member @Int tm'
False
Benchmarks
Tables below contain comparision with DMap TypeRep
of ten lookup
operations
on structure with size 10^4
:
ghc-8.2.2 | ghc-8.4.3 | ghc-8.8.3 | ghc-8.10.1 | |
---|---|---|---|---|
DMap TypeRep |
517.5 ns | 779.9 ns | 1.559 μs | 1.786 μs |
typerep-map |
205.3 ns | 187.2 ns | 190.1 ns | 169.1 ns |
ghc-8.2.2 | ghc-8.4.3 |
---|---|
![]() |
![]() |
![]() |
![]() |
*Note that all licence references and agreements mentioned in the typerep-map README section above
are relevant to that project's source code only.