Safe Haskell | None |
---|---|
Language | Haskell98 |
Feed table definitions. This is a specialization of Imm.Database.
- newtype FeedID = FeedID URI
- data DatabaseEntry = DatabaseEntry {}
- newDatabaseEntry :: FeedID -> Text -> DatabaseEntry
- data FeedTable = FeedTable
- data FeedStatus
- = Unknown
- | New
- | LastUpdate UTCTime
- data Database = Database [DatabaseEntry]
- type DatabaseF' = DatabaseF FeedTable
- type CoDatabaseF' = CoDatabaseF FeedTable
- register :: (MonadThrow m, LoggerF :<: f, DatabaseF' :<: f, MonadFree f m) => FeedID -> Text -> m ()
- getStatus :: (DatabaseF' :<: f, MonadFree f m, MonadCatch m) => FeedID -> m FeedStatus
- addReadHash :: (DatabaseF' :<: f, MonadFree f m, MonadThrow m, LoggerF :<: f) => FeedID -> Int -> m ()
- markAsRead :: (MonadIO m, DatabaseF' :<: f, MonadFree f m, MonadThrow m, LoggerF :<: f) => FeedID -> m ()
- markAsUnread :: (DatabaseF' :<: f, MonadFree f m, MonadThrow m, LoggerF :<: f) => FeedID -> m ()
Types
Unique key in feeds table
data DatabaseEntry Source #
DatabaseEntry | |
|
newDatabaseEntry :: FeedID -> Text -> DatabaseEntry Source #
Singleton type to represent feeds table
type DatabaseF' = DatabaseF FeedTable Source #
type CoDatabaseF' = CoDatabaseF FeedTable Source #
Primitives
register :: (MonadThrow m, LoggerF :<: f, DatabaseF' :<: f, MonadFree f m) => FeedID -> Text -> m () Source #
getStatus :: (DatabaseF' :<: f, MonadFree f m, MonadCatch m) => FeedID -> m FeedStatus Source #
addReadHash :: (DatabaseF' :<: f, MonadFree f m, MonadThrow m, LoggerF :<: f) => FeedID -> Int -> m () Source #
markAsRead :: (MonadIO m, DatabaseF' :<: f, MonadFree f m, MonadThrow m, LoggerF :<: f) => FeedID -> m () Source #
Set the last check time to now
markAsUnread :: (DatabaseF' :<: f, MonadFree f m, MonadThrow m, LoggerF :<: f) => FeedID -> m () Source #
Unset feed's last update and remove all read hashes