Safe Haskell | None |
---|---|
Language | Haskell98 |
Implementation of Imm.Database based on a JSON file.
Synopsis
- data JsonFileDatabase t
- mkJsonFileDatabase :: Table t => FilePath -> JsonFileDatabase t
- defaultDatabase :: Table t => IO (TVar (JsonFileDatabase t))
- mkHandle :: (Table t, FromJSON (Key t), FromJSON (Entry t), ToJSON (Key t), ToJSON (Entry t), MonadIO m, MonadMask m) => TVar (JsonFileDatabase t) -> Handle m t
- data JsonException = UnableDecode
- module Imm.Database.FeedTable
Documentation
data JsonFileDatabase t Source #
Instances
Pretty (JsonFileDatabase t) Source # | |
Defined in Imm.Database.JsonFile pretty :: JsonFileDatabase t -> Doc ann # prettyList :: [JsonFileDatabase t] -> Doc ann # |
mkJsonFileDatabase :: Table t => FilePath -> JsonFileDatabase t Source #
defaultDatabase :: Table t => IO (TVar (JsonFileDatabase t)) Source #
Default database is stored in $XDG_CONFIG_HOME/imm/feeds.json
mkHandle :: (Table t, FromJSON (Key t), FromJSON (Entry t), ToJSON (Key t), ToJSON (Entry t), MonadIO m, MonadMask m) => TVar (JsonFileDatabase t) -> Handle m t Source #
data JsonException Source #
Instances
Eq JsonException Source # | |
Defined in Imm.Database.JsonFile (==) :: JsonException -> JsonException -> Bool # (/=) :: JsonException -> JsonException -> Bool # | |
Show JsonException Source # | |
Defined in Imm.Database.JsonFile showsPrec :: Int -> JsonException -> ShowS # show :: JsonException -> String # showList :: [JsonException] -> ShowS # | |
Exception JsonException Source # | |
Defined in Imm.Database.JsonFile |
module Imm.Database.FeedTable