prim-uniq alternatives and similar packages
Based on the "Data" category.
Alternatively, view prim-uniq alternatives based on common mentions on social networks and blogs.
-
semantic-source
Parsing, analyzing, and comparing source code across many languages -
lens
Lenses, Folds, and Traversals - Join us on web.libera.chat #haskell-lens -
code-builder
Packages for defining APIs, running them, generating client code and documentation. -
text
Haskell library for space- and time-efficient operations over Unicode text. -
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. -
resource-pool
A high-performance striped resource pooling implementation for Haskell -
primitive
This package provides various primitive memory-related operations. -
binary
Efficient, pure binary serialisation using ByteStrings in 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. -
audiovisual
Extensible records, variants, structs, effects, tangles -
dependent-sum
Dependent sums and supporting typeclasses for comparing and displaying them -
reflection
Reifies arbitrary Haskell terms into types that can be reflected back into terms -
dependent-map
Dependently-typed finite maps (partial dependent products) -
orgmode-parse
Attoparsec parser combinators for parsing org-mode structured text! -
scientific
Arbitrary-precision floating-point numbers represented using scientific notation -
streaming
An optimized general monad transformer for streaming applications, with a simple prelude of functions -
text-icu
This package provides the Haskell Data.Text.ICU library, for performing complex manipulation of Unicode text.
InfluxDB - Power Real-Time Data Analytics at Scale
Do you think we are missing an alternative of prim-uniq or a related project?
README
Unique values and an ad-hoc "unique-tag GADT"
This library defines 2 types - Uniq
and Tag
.
Uniq
is a traditional "unique value" type, extended with a state-token type parameter so it works in both IO
and ST
.
Tag
is like Uniq
with the addition of a phantom type parameter. The type of that parameter is fixed at the time the Tag
is created, so the uniqueness of the tag means that equality of tag values witnesses equality of their phantom types. In other words, given two Tag
s, if they are equal then their phantom type parameters are the same - just like pattern matching on a GADT constructor. The GEq
and GCompare
classes from the dependent-sum
package can be used to discover that type equality, allowing Tag
to be used for a pretty cool semi-dynamic typing scheme. For example (using the dependent-map
library):
import Data.Unique.Tag
import Data.Dependent.Map
main = do
x <- newTag
y <- newTag
z <- newTag
let m1 = fromList [x :=> 3, y :=> "hello"]
m2 = fromList [x :=> 17, z :=> (True, x)]
-- the type checker would (rightly) reject this line:
-- m3 = singleton y ("foo", "bar")
print (m1 ! x)
print (m1 ! y)
print (m2 ! x)
print (m1 ! snd (m2 ! z))
Which would print:
3
"hello"
17
3