Safe Haskell | None |
---|---|
Language | Haskell2010 |
Helpers to manipulate feeds
Synopsis
- data FeedRef
- data Feed
- = Rss (RssDocument '[ContentModule, DublinCoreModule])
- | Atom AtomFeed
- 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
Feed reference: either its URI, or its UID from database
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 #