newtype-zoo alternatives and similar packages
Based on the "Data" category.
Alternatively, view newtype-zoo 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. -
binary
Efficient, pure binary serialisation using ByteStrings in Haskell. -
resource-pool
A high-performance striped resource pooling implementation for Haskell -
primitive
This package provides various primitive memory-related operations. -
discrimination
Fast linear time sorting and discrimination for a large class of data types -
audiovisual
Extensible records, variants, structs, effects, tangles -
IORefCAS
A collection of different packages for CAS based data structures. -
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) -
streaming
An optimized general monad transformer for streaming applications, with a simple prelude of functions -
orgmode-parse
Attoparsec parser combinators for parsing org-mode structured text! -
safecopy
An extension to Data.Serialize with built-in version control -
text-icu
This package provides the Haskell Data.Text.ICU library, for performing complex manipulation of Unicode text. -
scientific
Arbitrary-precision floating-point numbers represented using scientific notation -
uuid-types
A Haskell library for creating, printing and parsing UUIDs
Build time-series-based applications quickly and at scale.
Do you think we are missing an alternative of newtype-zoo or a related project?
README
General Purpose Newtype Wrappers
A zoo of newtype
wrappers.
In everyday Haskell programming newtype wrappers occur again and again, to convey some extra meaning for the maintainer of the code, and to prevent mixing up parameters to functions with the same type.
For example:
applyConfiguration :: MyConfig -> MyConfig -> IO MyConfig
What the user actually wanted to express was:
applyConfiguration :: Wanted MyConfig -> Current MyConfig -> IO (Active MyConfig)
The newtype wrappers in this library are all exported by
the NewtypeZoo
module, or can
be imported individually.
This simple library contains a variety of simple newtype wrappers:
Active
Allocated
Broken
Cached
Complete
Completed
Consistent
Current
Disabled
Enabled
Established
Existing
Failed
Inconsistent
Invalid
Marked
Missing
Multiple
Needed
New
Next
Obsolete
Offered
Old
Partial
Pending
Previous
Proposed
Rejected
Remaining
Replied
Required
Requested
Responded
Single
Unchecked
Unwanted
Updated
Valid
Wanted
They live in the sub directory NewtypeZoo
, e.g. NewtypeZoo.Active
.
This library offers shorter code for the special cases.
The tagged
library is more general, but requires more code.
The reason why I prefer this library in some cases, is shorter type signatures.
One can even combine tagged
with newtype-zoo
(I think I will add this to the README):
import Data.Tagged
import NewtypeZoo.Current
import NewtypeZoo.Wanted
applyConfigurationTagged
:: Tagged Wanted MyConfig
-> Tagged Current MyConfig
-> IO (Tagged Current MyConfig)