Safe Haskell | None |
---|---|
Language | Haskell2010 |
Helpers to manipulate feeds
Synopsis
- data FeedLocation
- data FeedQuery
- = ByDatabaseID Int
- | ByURI URI
- | AllFeeds
- data Feed
- data FeedElement
- data FeedURI = FeedURI (URIRef a)
- sameURIType :: URIRef a1 -> URIRef a2 -> Maybe (URIRef a1 :~: URIRef a2)
- withFeedURI :: (forall a. URIRef a -> b) -> FeedURI -> b
- renderFeed :: Feed -> Text
- renderFeedElement :: FeedElement -> Text
- parseFeed :: MonadCatch m => Text -> m Feed
- parseFeedElement :: MonadCatch m => Text -> m FeedElement
- removeElements :: Feed -> Feed
- getFeedTitle :: Feed -> Text
- getElements :: Feed -> [FeedElement]
- getDate :: FeedElement -> Maybe UTCTime
- getTitle :: FeedElement -> Text
- getContent :: FeedElement -> Text
- getLink :: FeedElement -> Maybe FeedURI
- getId :: FeedElement -> Text
- prettyElement :: FeedElement -> Doc a
Types
data FeedLocation Source #
Feed location identifies a feed. It is either: - the feed URI - a webpage URI that refers to the feed through an alternate link, in which case an optional feed title can be provided to disambiguate multiple such links
Instances
A query describes a set of feeds through some criteria.
data FeedElement Source #
Instances
Eq FeedElement Source # | |
Defined in Imm.Feed (==) :: FeedElement -> FeedElement -> Bool # (/=) :: FeedElement -> FeedElement -> Bool # | |
Ord FeedElement Source # | |
Defined in Imm.Feed compare :: FeedElement -> FeedElement -> Ordering # (<) :: FeedElement -> FeedElement -> Bool # (<=) :: FeedElement -> FeedElement -> Bool # (>) :: FeedElement -> FeedElement -> Bool # (>=) :: FeedElement -> FeedElement -> Bool # max :: FeedElement -> FeedElement -> FeedElement # min :: FeedElement -> FeedElement -> FeedElement # | |
Show FeedElement Source # | |
Defined in Imm.Feed showsPrec :: Int -> FeedElement -> ShowS # show :: FeedElement -> String # showList :: [FeedElement] -> ShowS # | |
Pretty (PrettyKey FeedElement) Source # | |
Defined in Imm.Feed pretty :: PrettyKey FeedElement -> Doc ann # prettyList :: [PrettyKey FeedElement] -> Doc ann # |
withFeedURI :: (forall a. URIRef a -> b) -> FeedURI -> b Source #
Generic parsers/renderers
renderFeed :: Feed -> Text Source #
renderFeedElement :: FeedElement -> Text Source #
parseFeedElement :: MonadCatch m => Text -> m FeedElement Source #
Generic mutators
removeElements :: Feed -> Feed Source #
Generic getters
getFeedTitle :: Feed -> Text Source #
getElements :: Feed -> [FeedElement] Source #
getTitle :: FeedElement -> Text Source #
getContent :: FeedElement -> Text Source #
getId :: FeedElement -> Text Source #
Misc
prettyElement :: FeedElement -> Doc a Source #