@hackage ron0.2
RON, RON-RDT, and RON-Schema
Installation
Dependencies (23)
- Diff
- aeson
- attoparsec
- base >=4.10 && <4.13
- binary
- bytestring Show all…
Dependents (3)
@hackage/ron-storage, @hackage/ron-schema, @hackage/ron-rdt
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