Safe Haskell | None |
---|---|
Language | Haskell2010 |
Feed table definitions. This is a specialization of Imm.Database.
Synopsis
- newtype FeedID = FeedID URI
- prettyFeedID :: FeedID -> Doc AnsiStyle
- getHashes :: FeedElement -> [Int]
- newtype JsonURI = JsonURI {
- _unwrapURI :: URI
- newtype JsonElement = JsonElement {}
- data DatabaseEntry = DatabaseEntry {}
- prettyShortDatabaseEntry :: DatabaseEntry -> Doc AnsiStyle
- prettyDatabaseEntry :: DatabaseEntry -> Doc AnsiStyle
- newDatabaseEntry :: FeedID -> Set Text -> DatabaseEntry
- data FeedTable = FeedTable
- data FeedStatus
- = Unknown
- | New
- | LastUpdate UTCTime
- newtype Database = Database [DatabaseEntry]
- register :: MonadThrow m => Handle m -> Handle m FeedTable -> FeedID -> Set Text -> m ()
- getStatus :: MonadCatch m => Handle m FeedTable -> FeedID -> m FeedStatus
- markAsProcessed :: MonadThrow m => MonadTime m => Handle m -> Handle m FeedTable -> FeedID -> FeedElement -> m ()
- markAsUnprocessed :: MonadThrow m => Handle m -> Handle m FeedTable -> FeedID -> m ()
- isRead :: MonadCatch m => Handle m FeedTable -> FeedID -> FeedElement -> m Bool
Types
Unique key in feeds table
getHashes :: FeedElement -> [Int] Source #
JsonURI | |
|
newtype JsonElement Source #
Newtype wrapper to provide FromJSON
and ToJSON
instances for FeedElement
Instances
data DatabaseEntry Source #
DatabaseEntry | |
|
Instances
Eq DatabaseEntry Source # | |
Defined in Imm.Database.FeedTable (==) :: DatabaseEntry -> DatabaseEntry -> Bool # (/=) :: DatabaseEntry -> DatabaseEntry -> Bool # | |
Show DatabaseEntry Source # | |
Defined in Imm.Database.FeedTable showsPrec :: Int -> DatabaseEntry -> ShowS # show :: DatabaseEntry -> String # showList :: [DatabaseEntry] -> ShowS # | |
ToJSON DatabaseEntry Source # | |
Defined in Imm.Database.FeedTable toJSON :: DatabaseEntry -> Value # toEncoding :: DatabaseEntry -> Encoding # toJSONList :: [DatabaseEntry] -> Value # toEncodingList :: [DatabaseEntry] -> Encoding # | |
FromJSON DatabaseEntry Source # | |
Defined in Imm.Database.FeedTable parseJSON :: Value -> Parser DatabaseEntry # parseJSONList :: Value -> Parser [DatabaseEntry] # |
newDatabaseEntry :: FeedID -> Set Text -> DatabaseEntry Source #
Singleton type to represent feeds table
Instances
Eq FeedTable Source # | |
Ord FeedTable Source # | |
Defined in Imm.Database.FeedTable | |
Read FeedTable Source # | |
Show FeedTable Source # | |
Pretty FeedTable Source # | |
Defined in Imm.Database.FeedTable | |
Table FeedTable Source # | |
type Key FeedTable Source # | |
Defined in Imm.Database.FeedTable | |
type Entry FeedTable Source # | |
Defined in Imm.Database.FeedTable |
data FeedStatus Source #
Instances
Pretty FeedStatus Source # | |
Defined in Imm.Database.FeedTable pretty :: FeedStatus -> Doc ann # prettyList :: [FeedStatus] -> Doc ann # |
Primitives
getStatus :: MonadCatch m => Handle m FeedTable -> FeedID -> m FeedStatus Source #
markAsProcessed :: MonadThrow m => MonadTime m => Handle m -> Handle m FeedTable -> FeedID -> FeedElement -> m () Source #
markAsUnprocessed :: MonadThrow m => Handle m -> Handle m FeedTable -> FeedID -> m () Source #
isRead :: MonadCatch m => Handle m FeedTable -> FeedID -> FeedElement -> m Bool Source #