packages feed

ron-0.2: ron.cabal

cabal-version:  2.2

name:           ron
version:        0.2

bug-reports:    https://github.com/ff-notes/ron/issues
category:       Distributed Systems, Protocol, Database
copyright:      2018 Yuriy Syrovetskiy
homepage:       https://github.com/ff-notes/ron
license:        BSD-3-Clause
license-file:   LICENSE
maintainer:     Yuriy Syrovetskiy <haskell@cblp.su>
synopsis:       RON, RON-RDT, and RON-Schema

description:
    Replicated Object Notation (RON), data types (RDT), and RON-Schema
    .
    Typical usage:
    .
    > import RON.Data
    > import RON.Schema.TH
    > import RON.Storage.IO as Storage
    >
    > $(let note = StructLww "Note"
    >           [ ("active", field boole)
    >           , ("text",   field rgaString) ]
    >           def{saHaskellDeriving = ["Eq", "Show"]}
    >   in mkReplicated [DStructLww note])
    >
    > instance Collection Note where
    >     collectionName = "note"
    >
    > main :: IO ()
    > main = do
    >     let dataDir = "./data/"
    >     h <- Storage.newHandle dataDir
    >     runStorage h $ do
    >         obj <- newObject
    >             Note{active = True, text = "Выступить на FProg SPb"}
    >         createDocument obj

build-type:     Simple

common language
    build-depends:
        base >= 4.10 && < 4.13,
    default-extensions: StrictData
    default-language:   Haskell2010

library
    import: language
    build-depends:
        aeson,
        attoparsec,
        binary,
        bytestring,
        containers,
        data-default,
        deepseq,
        Diff,
        directory,
        errors,
        extra,
        filepath,
        hashable,
        mtl,
        network-info,
        safe,
        stringsearch,
        template-haskell,
        text,
        time,
        unordered-containers,
        vector,
    exposed-modules:
        RON.Base64
        RON.Binary
        RON.Binary.Parse
        RON.Binary.Serialize
        RON.Binary.Types
        RON.Data
        RON.Data.Internal
        RON.Data.LWW
        RON.Data.ORSet
        RON.Data.RGA
        RON.Data.Time
        RON.Data.VersionVector
        RON.Epoch
        RON.Event
        RON.Event.Simulation
        RON.Internal.Prelude
        RON.Internal.Word
        RON.Schema
        RON.Schema.TH
        RON.Storage
        RON.Storage.IO
        RON.Storage.Test
        RON.Text
        RON.Text.Parse
        RON.Text.Serialize
        RON.Text.Serialize.UUID
        RON.Types
        RON.UUID
    other-modules:
        Attoparsec.Extra
        Data.ZigZag
    hs-source-dirs: lib

benchmark bench
    import: language
    build-depends:
        -- global
        criterion,
        deepseq,
        -- package
        ron,
    main-is: Main.hs
    hs-source-dirs: bench
    type: exitcode-stdio-1.0