@hackage ron-schema0.5

RON-Schema

  • Categories

  • License

    BSD-3-Clause

  • Maintainer

    Yuriy Syrovetskiy <haskell@cblp.su>

  • Versions

    • 0.9.1 Fri, 6 Sep 2019
    • 0.9 Fri, 6 Sep 2019
    • 0.8 Fri, 9 Aug 2019
    • 0.7 Fri, 26 Jul 2019
    • 0.6 Thu, 25 Apr 2019
    • 0.5 Tue, 5 Feb 2019

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

[mkReplicated|
    (struct_lww Note
        active Boole
        text RgaString)
|]

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 = "Write a task manager"}
        createDocument obj