crjdt-haskell alternatives and similar packages
Based on the "Data" category.
Alternatively, view crjdt-haskell 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 -
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. -
unordered-containers
Efficient hashing-based container types -
compendium-client
Mu (μ) is a purely functional framework for building micro services. -
cassava
A CSV parsing and encoding library optimized for ease of use and high performance -
holmes
A reference library for constraint-solving with propagators and CDCL. -
resource-pool
A high-performance striped resource pooling implementation for Haskell -
binary
Efficient, pure binary serialisation using ByteStrings in Haskell. -
primitive
This package provides various primitive memory-related operations. -
json-autotype
Automatic Haskell type inference from JSON input -
discrimination
Fast linear time sorting and discrimination for a large class of data types -
audiovisual
Extensible records, variants, structs, effects, tangles -
reflection
Reifies arbitrary Haskell terms into types that can be reflected back into terms -
IORefCAS
A collection of different packages for CAS based data structures. -
dependent-map
Dependently-typed finite maps (partial dependent products) -
dependent-sum
Dependent sums and supporting typeclasses for comparing and displaying them -
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! -
bifunctors
Haskell 98 bifunctors, bifoldables and bitraversables -
text-icu
This package provides the Haskell Data.Text.ICU library, for performing complex manipulation of Unicode text. -
protobuf
An implementation of Google's Protocol Buffers in Haskell. -
safecopy
An extension to Data.Serialize with built-in version control -
scientific
Arbitrary-precision floating-point numbers represented using scientific notation -
uuid-types
A Haskell library for creating, printing and parsing UUIDs
Clean code begins in your IDE with SonarLint
Do you think we are missing an alternative of crjdt-haskell or a related project?
README
A Conflict-Free Replicated JSON Datatype for Haskell
crjdt-haskell provides high level interface to CRDT which is formalised in the paper by Martin Kleppmann and Alastair R. Beresford.
Documentation
See haddocks.
Example
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Crjdt as C
-- Original state
original :: Command ()
original = doc .> key "key" =: "A"
-- First replica updates doc["key"] to "B"
replica1 :: Command ()
replica1 = original *> doc .> key "key" =: "B"
-- Second replica updates doc["key"] to "C"
replica2 :: Command ()
replica2 = original *> doc .> key "key" =: "C"
main :: IO ()
main = do
-- Sync first and second replica
let Right (r1, r2) = sync (1, replica1) (2, replica2)
let replica1' = execEval 1 r1
replica2' = execEval 2 r2
-- Both replicas converge to: {"key": {"B", "C"}}
print (document replica1' == document replica2') -- True
Future work
- Improve documentation
- Aeson support
- Simplify API as described in second version of the paper
Other implementations
LICENSE
Copyright © 2017-2018 Amar Potghan
Distributed under BSD License.
*Note that all licence references and agreements mentioned in the crjdt-haskell README section above
are relevant to that project's source code only.