shapelydata alternatives and similar packages
Based on the "Data" category.
Alternatively, view shapelydata alternatives based on common mentions on social networks and blogs.

lens
Lenses, Folds, and Traversals  Join us on web.libera.chat #haskelllens 
semanticsource
Parsing, analyzing, and comparing source code across many languages 
codebuilder
Packages for defining APIs, running them, generating client code and documentation. 
text
Haskell library for space and timeefficient operations over Unicode text. 
unorderedcontainers
Efficient hashingbased container types 
cassava
A CSV parsing and encoding library optimized for ease of use and high performance 
compendiumclient
Mu (μ) is a purely functional framework for building micro services. 
holmes
A reference library for constraintsolving with propagators and CDCL. 
resourcepool
A highperformance striped resource pooling implementation for Haskell 
primitive
This package provides various primitive memoryrelated operations. 
binary
Efficient, pure binary serialisation using ByteStrings in Haskell. 
jsonautotype
Automatic Haskell type inference from JSON input 
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 
dependentsum
Dependent sums and supporting typeclasses for comparing and displaying them 
dependentmap
Dependentlytyped finite maps (partial dependent products) 
safecopy
An extension to Data.Serialize with builtin version control 
orgmodeparse
Attoparsec parser combinators for parsing orgmode structured text! 
scientific
Arbitraryprecision floatingpoint numbers represented using scientific notation 
reflection
Reifies arbitrary Haskell terms into types that can be reflected back into terms 
streaming
An optimized general monad transformer for streaming applications, with a simple prelude of functions 
protobuf
An implementation of Google's Protocol Buffers in Haskell. 
texticu
This package provides the Haskell Data.Text.ICU library, for performing complex manipulation of Unicode text. 
uuidtypes
A Haskell library for creating, printing and parsing UUIDs
WorkOS  The modern identity platform for B2B SaaS
Do you think we are missing an alternative of shapelydata or a related project?
README
shapelydata
is a haskell library up here on hackage
for working with algebraic datatypes in a simple generic form made up of
haskell's primitive product, sum and unit types: (,)
, Either
, and ()
.
You can install it with
cabal install shapelydata
Motivation and examples
In order from most to least important to me, here are the concerns that motivated the library:
Provide a good story for
(,)
/Either
as a lingua franca generic representation that other library writers can use without dependencies, encouraging abstractions in terms of products and sums (motivated specifically by my work onsimpleactors
.Support algebraic operations on ADTs, making types composable
 multiplication: let a = (X,(X,(X,()))) b = Left (Y,(Y,())) :: Either (Y,(Y,())) (Z,()) ab = a >*< b in ab == ( Left (X,(X,(X,(Y,(Y,()))))) :: Either (X,(X,(X,(Y,(Y,()))))) (X,(X,(X,(Z,())))) )  exponentiation: fanout (head,(tail,(Prelude.length,()))) [1..3] == (1,([2,3],(3,()))) (unfanin (_4 `ary` (shiftl . Sh.reverse)) 1 2 3 4) == (3,(2,(1,(4,()))))
Support powerful, typed conversions between
Shapely
typesdata F1 = F1 (Maybe F1) (Maybe [Int]) deriving Eq data F2 = F2 (Maybe F2) (Maybe [Int]) deriving Eq f2 :: F2 f2 = coerce (F1 Nothing $ Just [1..3]) data Tsil a = Snoc (Tsil a) a  Lin deriving Eq truth = massage "123" == Snoc (Snoc (Snoc Lin '3') '2') '1'
Lowest on the list is supporting abstracting over different recursion schemes or supporting generic traversals and folds, though some basic support is planned.
Finally, in at least some cases this can completely replace GHC.Generics
and
may be a bit simpler. See examples/Generics.hs
for an example of the
GHC.Generics
wiki example
ported to shapelydata
. And for a nice view on the changes that were
required, do:
git show 3a65e95  perl /usr/share/doc/git/contrib/diffhighlight/diffhighlight
Why not GHC.Generics?
The GHC.Generics
representation has a lot of metadata and a complex
structure that can be useful in deriving default instances; more important to
us is to have a simple, canonical representation such that two types that
differ only in constructor names can be expected to have identical generic
representations.
This supports APIs that are typeagnostic (e.g. a database library that returns
a generic Product
, convertible later with to
), and allows us to define
algebraic operations and composition & conversion functions.