Safe Haskell | None |
---|---|
Language | Haskell98 |
Feed table definitions. This is a specialization of Imm.Database.
Synopsis
- newtype FeedID = FeedID URI
- prettyFeedID :: FeedID -> Doc AnsiStyle
- data DatabaseEntry = DatabaseEntry {}
- 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
- addReadHash :: MonadThrow m => Handle m -> Handle m FeedTable -> FeedID -> Int -> m ()
- markAsRead :: (MonadTime m, MonadThrow m) => Handle m -> Handle m FeedTable -> FeedID -> m ()
- markAsUnread :: MonadThrow m => Handle m -> Handle m FeedTable -> FeedID -> m ()
Types
Unique key in feeds table
data DatabaseEntry Source #
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
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 #
addReadHash :: MonadThrow m => Handle m -> Handle m FeedTable -> FeedID -> Int -> m () Source #
markAsRead :: (MonadTime m, MonadThrow m) => Handle m -> Handle m FeedTable -> FeedID -> m () Source #
Set the last check time to now
markAsUnread :: MonadThrow m => Handle m -> Handle m FeedTable -> FeedID -> m () Source #
Unset feed's last update and remove all read hashes