{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Text.RSS.Extensions.Syndication
(
SyndicationModule(..)
, RssChannelExtension(..)
, RssItemExtension(..)
, SyndicationInfo(..)
, mkSyndicationInfo
, SyndicationPeriod(..)
, asSyndicationPeriod
, syndicationInfo
, syndicationPeriod
, syndicationFrequency
, syndicationBase
, renderSyndicationInfo
, renderSyndicationPeriod
, renderSyndicationFrequency
, renderSyndicationBase
, namespacePrefix
, namespaceURI
) where
import Text.RSS.Extensions
import Text.RSS.Types
import Conduit hiding (throwM)
import Control.Applicative
import Control.Exception.Safe as Exception
import Control.Monad
import Control.Monad.Fix
import Data.Maybe
import Data.Text
import Data.Time.Clock
import Data.Time.LocalTime
import Data.Time.RFC2822
import Data.Time.RFC3339
import Data.Time.RFC822
import Data.XML.Types
import GHC.Generics
import Lens.Micro
import Lens.Micro.TH
import Text.Read
import Text.XML.Stream.Parse
import qualified Text.XML.Stream.Render as Render
import URI.ByteString
tshow :: Show a => a -> Text
tshow :: a -> Text
tshow = String -> Text
pack (String -> Text) -> (a -> String) -> a -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> String
forall a. Show a => a -> String
show
asDate :: MonadThrow m => Text -> m UTCTime
asDate :: Text -> m UTCTime
asDate Text
text = m UTCTime
-> (ZonedTime -> m UTCTime) -> Maybe ZonedTime -> m UTCTime
forall b a. b -> (a -> b) -> Maybe a -> b
maybe (RssException -> m UTCTime
forall (m :: * -> *) e a. (MonadThrow m, Exception e) => e -> m a
throw (RssException -> m UTCTime) -> RssException -> m UTCTime
forall a b. (a -> b) -> a -> b
$ Text -> RssException
InvalidTime Text
text) (UTCTime -> m UTCTime
forall (m :: * -> *) a. Monad m => a -> m a
return (UTCTime -> m UTCTime)
-> (ZonedTime -> UTCTime) -> ZonedTime -> m UTCTime
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ZonedTime -> UTCTime
zonedTimeToUTC) (Maybe ZonedTime -> m UTCTime) -> Maybe ZonedTime -> m UTCTime
forall a b. (a -> b) -> a -> b
$
Text -> Maybe ZonedTime
forall t. TextualMonoid t => t -> Maybe ZonedTime
parseTimeRFC3339 Text
text Maybe ZonedTime -> Maybe ZonedTime -> Maybe ZonedTime
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> Text -> Maybe ZonedTime
forall t. TextualMonoid t => t -> Maybe ZonedTime
parseTimeRFC2822 Text
text Maybe ZonedTime -> Maybe ZonedTime -> Maybe ZonedTime
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> Text -> Maybe ZonedTime
forall t. TextualMonoid t => t -> Maybe ZonedTime
parseTimeRFC822 Text
text
asInt :: MonadThrow m => Text -> m Int
asInt :: Text -> m Int
asInt Text
t = m Int -> (Int -> m Int) -> Maybe Int -> m Int
forall b a. b -> (a -> b) -> Maybe a -> b
maybe (RssException -> m Int
forall (m :: * -> *) e a. (MonadThrow m, Exception e) => e -> m a
throwM (RssException -> m Int) -> RssException -> m Int
forall a b. (a -> b) -> a -> b
$ Text -> RssException
InvalidInt Text
t) Int -> m Int
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Int -> m Int) -> (String -> Maybe Int) -> String -> m Int
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> Maybe Int
forall a. Read a => String -> Maybe a
readMaybe (String -> m Int) -> String -> m Int
forall a b. (a -> b) -> a -> b
$ Text -> String
unpack Text
t
projectC :: Monad m => Traversal' a b -> ConduitT a b m ()
projectC :: Traversal' a b -> ConduitT a b m ()
projectC Traversal' a b
prism = (ConduitT a b m () -> ConduitT a b m ()) -> ConduitT a b m ()
forall a. (a -> a) -> a
fix ((ConduitT a b m () -> ConduitT a b m ()) -> ConduitT a b m ())
-> (ConduitT a b m () -> ConduitT a b m ()) -> ConduitT a b m ()
forall a b. (a -> b) -> a -> b
$ \ConduitT a b m ()
recurse -> do
Maybe a
item <- ConduitT a b m (Maybe a)
forall (m :: * -> *) i. Monad m => Consumer i m (Maybe i)
await
case (Maybe a
item, Maybe a
item Maybe a -> Getting (First b) (Maybe a) b -> Maybe b
forall s a. s -> Getting (First a) s a -> Maybe a
^? ((a -> Const (First b) a) -> Maybe a -> Const (First b) (Maybe a)
forall a a'. Traversal (Maybe a) (Maybe a') a a'
_Just ((a -> Const (First b) a) -> Maybe a -> Const (First b) (Maybe a))
-> ((b -> Const (First b) b) -> a -> Const (First b) a)
-> Getting (First b) (Maybe a) b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (b -> Const (First b) b) -> a -> Const (First b) a
Traversal' a b
prism)) of
(Maybe a
_, Just b
a) -> b -> ConduitT a b m ()
forall (m :: * -> *) o i. Monad m => o -> ConduitT i o m ()
yield b
a ConduitT a b m () -> ConduitT a b m () -> ConduitT a b m ()
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ConduitT a b m ()
recurse
(Just a
_, Maybe b
_) -> ConduitT a b m ()
recurse
(Maybe a, Maybe b)
_ -> () -> ConduitT a b m ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
newtype SyndicationException = InvalidSyndicationPeriod Text deriving(SyndicationException -> SyndicationException -> Bool
(SyndicationException -> SyndicationException -> Bool)
-> (SyndicationException -> SyndicationException -> Bool)
-> Eq SyndicationException
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SyndicationException -> SyndicationException -> Bool
$c/= :: SyndicationException -> SyndicationException -> Bool
== :: SyndicationException -> SyndicationException -> Bool
$c== :: SyndicationException -> SyndicationException -> Bool
Eq, (forall x. SyndicationException -> Rep SyndicationException x)
-> (forall x. Rep SyndicationException x -> SyndicationException)
-> Generic SyndicationException
forall x. Rep SyndicationException x -> SyndicationException
forall x. SyndicationException -> Rep SyndicationException x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SyndicationException x -> SyndicationException
$cfrom :: forall x. SyndicationException -> Rep SyndicationException x
Generic, Eq SyndicationException
Eq SyndicationException
-> (SyndicationException -> SyndicationException -> Ordering)
-> (SyndicationException -> SyndicationException -> Bool)
-> (SyndicationException -> SyndicationException -> Bool)
-> (SyndicationException -> SyndicationException -> Bool)
-> (SyndicationException -> SyndicationException -> Bool)
-> (SyndicationException
-> SyndicationException -> SyndicationException)
-> (SyndicationException
-> SyndicationException -> SyndicationException)
-> Ord SyndicationException
SyndicationException -> SyndicationException -> Bool
SyndicationException -> SyndicationException -> Ordering
SyndicationException
-> SyndicationException -> SyndicationException
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: SyndicationException
-> SyndicationException -> SyndicationException
$cmin :: SyndicationException
-> SyndicationException -> SyndicationException
max :: SyndicationException
-> SyndicationException -> SyndicationException
$cmax :: SyndicationException
-> SyndicationException -> SyndicationException
>= :: SyndicationException -> SyndicationException -> Bool
$c>= :: SyndicationException -> SyndicationException -> Bool
> :: SyndicationException -> SyndicationException -> Bool
$c> :: SyndicationException -> SyndicationException -> Bool
<= :: SyndicationException -> SyndicationException -> Bool
$c<= :: SyndicationException -> SyndicationException -> Bool
< :: SyndicationException -> SyndicationException -> Bool
$c< :: SyndicationException -> SyndicationException -> Bool
compare :: SyndicationException -> SyndicationException -> Ordering
$ccompare :: SyndicationException -> SyndicationException -> Ordering
$cp1Ord :: Eq SyndicationException
Ord, Int -> SyndicationException -> ShowS
[SyndicationException] -> ShowS
SyndicationException -> String
(Int -> SyndicationException -> ShowS)
-> (SyndicationException -> String)
-> ([SyndicationException] -> ShowS)
-> Show SyndicationException
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SyndicationException] -> ShowS
$cshowList :: [SyndicationException] -> ShowS
show :: SyndicationException -> String
$cshow :: SyndicationException -> String
showsPrec :: Int -> SyndicationException -> ShowS
$cshowsPrec :: Int -> SyndicationException -> ShowS
Show)
instance Exception SyndicationException where
displayException :: SyndicationException -> String
displayException (InvalidSyndicationPeriod Text
t) = String
"Invalid syndication period: " String -> ShowS
forall a. [a] -> [a] -> [a]
++ Text -> String
unpack Text
t
namespacePrefix :: Text
namespacePrefix :: Text
namespacePrefix = Text
"sy"
namespaceURI :: URIRef Absolute
namespaceURI :: URIRef Absolute
namespaceURI = URIRef Absolute
uri where Right URIRef Absolute
uri = URIParserOptions
-> ByteString -> Either URIParseError (URIRef Absolute)
parseURI URIParserOptions
laxURIParserOptions ByteString
"http://purl.org/rss/1.0/modules/syndication/"
syndicationName :: Text -> Name
syndicationName :: Text -> Name
syndicationName Text
string = Text -> Maybe Text -> Maybe Text -> Name
Name Text
string (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
"http://purl.org/rss/1.0/modules/syndication/") (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
namespacePrefix)
syndicationTag :: MonadThrow m => Text -> ConduitT Event o m a -> ConduitT Event o m (Maybe a)
syndicationTag :: Text -> ConduitT Event o m a -> ConduitT Event o m (Maybe a)
syndicationTag Text
name = NameMatcher Name
-> ConduitT Event o m a -> ConduitT Event o m (Maybe a)
forall (m :: * -> *) a o b.
MonadThrow m =>
NameMatcher a
-> ConduitT Event o m b -> ConduitT Event o m (Maybe b)
tagIgnoreAttrs ((Name -> Bool) -> NameMatcher Name
matching (Name -> Name -> Bool
forall a. Eq a => a -> a -> Bool
== Text -> Name
syndicationName Text
name))
renderSyndicationTag :: Monad m => Text -> Text -> ConduitT () Event m ()
renderSyndicationTag :: Text -> Text -> ConduitT () Event m ()
renderSyndicationTag Text
name = Name
-> Attributes -> ConduitT () Event m () -> ConduitT () Event m ()
forall (m :: * -> *) i.
Monad m =>
Name
-> Attributes -> ConduitT i Event m () -> ConduitT i Event m ()
Render.tag (Text -> Name
syndicationName Text
name) Attributes
forall a. Monoid a => a
mempty (ConduitT () Event m () -> ConduitT () Event m ())
-> (Text -> ConduitT () Event m ())
-> Text
-> ConduitT () Event m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> ConduitT () Event m ()
forall (m :: * -> *) i. Monad m => Text -> ConduitT i Event m ()
Render.content
data SyndicationPeriod = Hourly | Daily | Weekly | Monthly | Yearly
deriving (SyndicationPeriod
SyndicationPeriod -> SyndicationPeriod -> Bounded SyndicationPeriod
forall a. a -> a -> Bounded a
maxBound :: SyndicationPeriod
$cmaxBound :: SyndicationPeriod
minBound :: SyndicationPeriod
$cminBound :: SyndicationPeriod
Bounded, Int -> SyndicationPeriod
SyndicationPeriod -> Int
SyndicationPeriod -> [SyndicationPeriod]
SyndicationPeriod -> SyndicationPeriod
SyndicationPeriod -> SyndicationPeriod -> [SyndicationPeriod]
SyndicationPeriod
-> SyndicationPeriod -> SyndicationPeriod -> [SyndicationPeriod]
(SyndicationPeriod -> SyndicationPeriod)
-> (SyndicationPeriod -> SyndicationPeriod)
-> (Int -> SyndicationPeriod)
-> (SyndicationPeriod -> Int)
-> (SyndicationPeriod -> [SyndicationPeriod])
-> (SyndicationPeriod -> SyndicationPeriod -> [SyndicationPeriod])
-> (SyndicationPeriod -> SyndicationPeriod -> [SyndicationPeriod])
-> (SyndicationPeriod
-> SyndicationPeriod -> SyndicationPeriod -> [SyndicationPeriod])
-> Enum SyndicationPeriod
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: SyndicationPeriod
-> SyndicationPeriod -> SyndicationPeriod -> [SyndicationPeriod]
$cenumFromThenTo :: SyndicationPeriod
-> SyndicationPeriod -> SyndicationPeriod -> [SyndicationPeriod]
enumFromTo :: SyndicationPeriod -> SyndicationPeriod -> [SyndicationPeriod]
$cenumFromTo :: SyndicationPeriod -> SyndicationPeriod -> [SyndicationPeriod]
enumFromThen :: SyndicationPeriod -> SyndicationPeriod -> [SyndicationPeriod]
$cenumFromThen :: SyndicationPeriod -> SyndicationPeriod -> [SyndicationPeriod]
enumFrom :: SyndicationPeriod -> [SyndicationPeriod]
$cenumFrom :: SyndicationPeriod -> [SyndicationPeriod]
fromEnum :: SyndicationPeriod -> Int
$cfromEnum :: SyndicationPeriod -> Int
toEnum :: Int -> SyndicationPeriod
$ctoEnum :: Int -> SyndicationPeriod
pred :: SyndicationPeriod -> SyndicationPeriod
$cpred :: SyndicationPeriod -> SyndicationPeriod
succ :: SyndicationPeriod -> SyndicationPeriod
$csucc :: SyndicationPeriod -> SyndicationPeriod
Enum, SyndicationPeriod -> SyndicationPeriod -> Bool
(SyndicationPeriod -> SyndicationPeriod -> Bool)
-> (SyndicationPeriod -> SyndicationPeriod -> Bool)
-> Eq SyndicationPeriod
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SyndicationPeriod -> SyndicationPeriod -> Bool
$c/= :: SyndicationPeriod -> SyndicationPeriod -> Bool
== :: SyndicationPeriod -> SyndicationPeriod -> Bool
$c== :: SyndicationPeriod -> SyndicationPeriod -> Bool
Eq, (forall x. SyndicationPeriod -> Rep SyndicationPeriod x)
-> (forall x. Rep SyndicationPeriod x -> SyndicationPeriod)
-> Generic SyndicationPeriod
forall x. Rep SyndicationPeriod x -> SyndicationPeriod
forall x. SyndicationPeriod -> Rep SyndicationPeriod x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SyndicationPeriod x -> SyndicationPeriod
$cfrom :: forall x. SyndicationPeriod -> Rep SyndicationPeriod x
Generic, Eq SyndicationPeriod
Eq SyndicationPeriod
-> (SyndicationPeriod -> SyndicationPeriod -> Ordering)
-> (SyndicationPeriod -> SyndicationPeriod -> Bool)
-> (SyndicationPeriod -> SyndicationPeriod -> Bool)
-> (SyndicationPeriod -> SyndicationPeriod -> Bool)
-> (SyndicationPeriod -> SyndicationPeriod -> Bool)
-> (SyndicationPeriod -> SyndicationPeriod -> SyndicationPeriod)
-> (SyndicationPeriod -> SyndicationPeriod -> SyndicationPeriod)
-> Ord SyndicationPeriod
SyndicationPeriod -> SyndicationPeriod -> Bool
SyndicationPeriod -> SyndicationPeriod -> Ordering
SyndicationPeriod -> SyndicationPeriod -> SyndicationPeriod
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: SyndicationPeriod -> SyndicationPeriod -> SyndicationPeriod
$cmin :: SyndicationPeriod -> SyndicationPeriod -> SyndicationPeriod
max :: SyndicationPeriod -> SyndicationPeriod -> SyndicationPeriod
$cmax :: SyndicationPeriod -> SyndicationPeriod -> SyndicationPeriod
>= :: SyndicationPeriod -> SyndicationPeriod -> Bool
$c>= :: SyndicationPeriod -> SyndicationPeriod -> Bool
> :: SyndicationPeriod -> SyndicationPeriod -> Bool
$c> :: SyndicationPeriod -> SyndicationPeriod -> Bool
<= :: SyndicationPeriod -> SyndicationPeriod -> Bool
$c<= :: SyndicationPeriod -> SyndicationPeriod -> Bool
< :: SyndicationPeriod -> SyndicationPeriod -> Bool
$c< :: SyndicationPeriod -> SyndicationPeriod -> Bool
compare :: SyndicationPeriod -> SyndicationPeriod -> Ordering
$ccompare :: SyndicationPeriod -> SyndicationPeriod -> Ordering
$cp1Ord :: Eq SyndicationPeriod
Ord, ReadPrec [SyndicationPeriod]
ReadPrec SyndicationPeriod
Int -> ReadS SyndicationPeriod
ReadS [SyndicationPeriod]
(Int -> ReadS SyndicationPeriod)
-> ReadS [SyndicationPeriod]
-> ReadPrec SyndicationPeriod
-> ReadPrec [SyndicationPeriod]
-> Read SyndicationPeriod
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SyndicationPeriod]
$creadListPrec :: ReadPrec [SyndicationPeriod]
readPrec :: ReadPrec SyndicationPeriod
$creadPrec :: ReadPrec SyndicationPeriod
readList :: ReadS [SyndicationPeriod]
$creadList :: ReadS [SyndicationPeriod]
readsPrec :: Int -> ReadS SyndicationPeriod
$creadsPrec :: Int -> ReadS SyndicationPeriod
Read, Int -> SyndicationPeriod -> ShowS
[SyndicationPeriod] -> ShowS
SyndicationPeriod -> String
(Int -> SyndicationPeriod -> ShowS)
-> (SyndicationPeriod -> String)
-> ([SyndicationPeriod] -> ShowS)
-> Show SyndicationPeriod
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SyndicationPeriod] -> ShowS
$cshowList :: [SyndicationPeriod] -> ShowS
show :: SyndicationPeriod -> String
$cshow :: SyndicationPeriod -> String
showsPrec :: Int -> SyndicationPeriod -> ShowS
$cshowsPrec :: Int -> SyndicationPeriod -> ShowS
Show)
asSyndicationPeriod :: MonadThrow m => Text -> m SyndicationPeriod
asSyndicationPeriod :: Text -> m SyndicationPeriod
asSyndicationPeriod Text
"hourly" = SyndicationPeriod -> m SyndicationPeriod
forall (f :: * -> *) a. Applicative f => a -> f a
pure SyndicationPeriod
Hourly
asSyndicationPeriod Text
"daily" = SyndicationPeriod -> m SyndicationPeriod
forall (f :: * -> *) a. Applicative f => a -> f a
pure SyndicationPeriod
Daily
asSyndicationPeriod Text
"weekly" = SyndicationPeriod -> m SyndicationPeriod
forall (f :: * -> *) a. Applicative f => a -> f a
pure SyndicationPeriod
Weekly
asSyndicationPeriod Text
"monthly" = SyndicationPeriod -> m SyndicationPeriod
forall (f :: * -> *) a. Applicative f => a -> f a
pure SyndicationPeriod
Monthly
asSyndicationPeriod Text
"yearly" = SyndicationPeriod -> m SyndicationPeriod
forall (f :: * -> *) a. Applicative f => a -> f a
pure SyndicationPeriod
Yearly
asSyndicationPeriod Text
t = SyndicationException -> m SyndicationPeriod
forall (m :: * -> *) e a. (MonadThrow m, Exception e) => e -> m a
throw (SyndicationException -> m SyndicationPeriod)
-> SyndicationException -> m SyndicationPeriod
forall a b. (a -> b) -> a -> b
$ Text -> SyndicationException
InvalidSyndicationPeriod Text
t
fromSyndicationPeriod :: SyndicationPeriod -> Text
fromSyndicationPeriod :: SyndicationPeriod -> Text
fromSyndicationPeriod SyndicationPeriod
Hourly = Text
"hourly"
fromSyndicationPeriod SyndicationPeriod
Daily = Text
"daily"
fromSyndicationPeriod SyndicationPeriod
Weekly = Text
"weekly"
fromSyndicationPeriod SyndicationPeriod
Monthly = Text
"monthly"
fromSyndicationPeriod SyndicationPeriod
Yearly = Text
"yearly"
data SyndicationInfo = SyndicationInfo
{ SyndicationInfo -> Maybe SyndicationPeriod
updatePeriod :: Maybe SyndicationPeriod
, SyndicationInfo -> Maybe Int
updateFrequency :: Maybe Int
, SyndicationInfo -> Maybe UTCTime
updateBase :: Maybe UTCTime
} deriving (SyndicationInfo -> SyndicationInfo -> Bool
(SyndicationInfo -> SyndicationInfo -> Bool)
-> (SyndicationInfo -> SyndicationInfo -> Bool)
-> Eq SyndicationInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SyndicationInfo -> SyndicationInfo -> Bool
$c/= :: SyndicationInfo -> SyndicationInfo -> Bool
== :: SyndicationInfo -> SyndicationInfo -> Bool
$c== :: SyndicationInfo -> SyndicationInfo -> Bool
Eq, (forall x. SyndicationInfo -> Rep SyndicationInfo x)
-> (forall x. Rep SyndicationInfo x -> SyndicationInfo)
-> Generic SyndicationInfo
forall x. Rep SyndicationInfo x -> SyndicationInfo
forall x. SyndicationInfo -> Rep SyndicationInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SyndicationInfo x -> SyndicationInfo
$cfrom :: forall x. SyndicationInfo -> Rep SyndicationInfo x
Generic, Eq SyndicationInfo
Eq SyndicationInfo
-> (SyndicationInfo -> SyndicationInfo -> Ordering)
-> (SyndicationInfo -> SyndicationInfo -> Bool)
-> (SyndicationInfo -> SyndicationInfo -> Bool)
-> (SyndicationInfo -> SyndicationInfo -> Bool)
-> (SyndicationInfo -> SyndicationInfo -> Bool)
-> (SyndicationInfo -> SyndicationInfo -> SyndicationInfo)
-> (SyndicationInfo -> SyndicationInfo -> SyndicationInfo)
-> Ord SyndicationInfo
SyndicationInfo -> SyndicationInfo -> Bool
SyndicationInfo -> SyndicationInfo -> Ordering
SyndicationInfo -> SyndicationInfo -> SyndicationInfo
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: SyndicationInfo -> SyndicationInfo -> SyndicationInfo
$cmin :: SyndicationInfo -> SyndicationInfo -> SyndicationInfo
max :: SyndicationInfo -> SyndicationInfo -> SyndicationInfo
$cmax :: SyndicationInfo -> SyndicationInfo -> SyndicationInfo
>= :: SyndicationInfo -> SyndicationInfo -> Bool
$c>= :: SyndicationInfo -> SyndicationInfo -> Bool
> :: SyndicationInfo -> SyndicationInfo -> Bool
$c> :: SyndicationInfo -> SyndicationInfo -> Bool
<= :: SyndicationInfo -> SyndicationInfo -> Bool
$c<= :: SyndicationInfo -> SyndicationInfo -> Bool
< :: SyndicationInfo -> SyndicationInfo -> Bool
$c< :: SyndicationInfo -> SyndicationInfo -> Bool
compare :: SyndicationInfo -> SyndicationInfo -> Ordering
$ccompare :: SyndicationInfo -> SyndicationInfo -> Ordering
$cp1Ord :: Eq SyndicationInfo
Ord, ReadPrec [SyndicationInfo]
ReadPrec SyndicationInfo
Int -> ReadS SyndicationInfo
ReadS [SyndicationInfo]
(Int -> ReadS SyndicationInfo)
-> ReadS [SyndicationInfo]
-> ReadPrec SyndicationInfo
-> ReadPrec [SyndicationInfo]
-> Read SyndicationInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SyndicationInfo]
$creadListPrec :: ReadPrec [SyndicationInfo]
readPrec :: ReadPrec SyndicationInfo
$creadPrec :: ReadPrec SyndicationInfo
readList :: ReadS [SyndicationInfo]
$creadList :: ReadS [SyndicationInfo]
readsPrec :: Int -> ReadS SyndicationInfo
$creadsPrec :: Int -> ReadS SyndicationInfo
Read, Int -> SyndicationInfo -> ShowS
[SyndicationInfo] -> ShowS
SyndicationInfo -> String
(Int -> SyndicationInfo -> ShowS)
-> (SyndicationInfo -> String)
-> ([SyndicationInfo] -> ShowS)
-> Show SyndicationInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SyndicationInfo] -> ShowS
$cshowList :: [SyndicationInfo] -> ShowS
show :: SyndicationInfo -> String
$cshow :: SyndicationInfo -> String
showsPrec :: Int -> SyndicationInfo -> ShowS
$cshowsPrec :: Int -> SyndicationInfo -> ShowS
Show)
mkSyndicationInfo :: SyndicationInfo
mkSyndicationInfo :: SyndicationInfo
mkSyndicationInfo = Maybe SyndicationPeriod
-> Maybe Int -> Maybe UTCTime -> SyndicationInfo
SyndicationInfo Maybe SyndicationPeriod
forall (m :: * -> *) a. MonadPlus m => m a
mzero Maybe Int
forall (m :: * -> *) a. MonadPlus m => m a
mzero Maybe UTCTime
forall (m :: * -> *) a. MonadPlus m => m a
mzero
data ElementPiece = ElementPeriod { ElementPiece -> SyndicationPeriod
__elementPeriod :: SyndicationPeriod }
| ElementFrequency { ElementPiece -> Int
__elementFrequency :: Int }
| ElementBase { ElementPiece -> UTCTime
__elementBase :: UTCTime }
makeLenses ''ElementPiece
syndicationInfo :: MonadThrow m => ConduitT Event o m SyndicationInfo
syndicationInfo :: ConduitT Event o m SyndicationInfo
syndicationInfo = ConduitT Event ElementPiece m (Maybe ElementPiece)
-> ConduitT Event ElementPiece m ()
forall (m :: * -> *) b.
MonadThrow m =>
ConduitT Event b m (Maybe b) -> ConduitT Event b m ()
manyYield' ([ConduitT Event ElementPiece m (Maybe ElementPiece)]
-> ConduitT Event ElementPiece m (Maybe ElementPiece)
forall (m :: * -> *) o a.
Monad m =>
[ConduitT Event o m (Maybe a)] -> ConduitT Event o m (Maybe a)
choose [ConduitT Event ElementPiece m (Maybe ElementPiece)]
forall o. [ConduitT Event o m (Maybe ElementPiece)]
piece) ConduitT Event ElementPiece m ()
-> ConduitM ElementPiece o m SyndicationInfo
-> ConduitT Event o m SyndicationInfo
forall (m :: * -> *) a b c r.
Monad m =>
ConduitM a b m () -> ConduitM b c m r -> ConduitM a c m r
.| ConduitM ElementPiece o m SyndicationInfo
forall o. ConduitT ElementPiece o m SyndicationInfo
parser where
parser :: ConduitT ElementPiece o m SyndicationInfo
parser = ZipConduit ElementPiece o m SyndicationInfo
-> ConduitT ElementPiece o m SyndicationInfo
forall i o (m :: * -> *) r. ZipConduit i o m r -> ConduitT i o m r
getZipConduit (ZipConduit ElementPiece o m SyndicationInfo
-> ConduitT ElementPiece o m SyndicationInfo)
-> ZipConduit ElementPiece o m SyndicationInfo
-> ConduitT ElementPiece o m SyndicationInfo
forall a b. (a -> b) -> a -> b
$ Maybe SyndicationPeriod
-> Maybe Int -> Maybe UTCTime -> SyndicationInfo
SyndicationInfo
(Maybe SyndicationPeriod
-> Maybe Int -> Maybe UTCTime -> SyndicationInfo)
-> ZipConduit ElementPiece o m (Maybe SyndicationPeriod)
-> ZipConduit
ElementPiece o m (Maybe Int -> Maybe UTCTime -> SyndicationInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ConduitT ElementPiece o m (Maybe SyndicationPeriod)
-> ZipConduit ElementPiece o m (Maybe SyndicationPeriod)
forall i o (m :: * -> *) r. ConduitT i o m r -> ZipConduit i o m r
ZipConduit (Traversal' ElementPiece SyndicationPeriod
-> ConduitT ElementPiece SyndicationPeriod m ()
forall (m :: * -> *) a b.
Monad m =>
Traversal' a b -> ConduitT a b m ()
projectC Traversal' ElementPiece SyndicationPeriod
_elementPeriod ConduitT ElementPiece SyndicationPeriod m ()
-> ConduitM SyndicationPeriod o m (Maybe SyndicationPeriod)
-> ConduitT ElementPiece o m (Maybe SyndicationPeriod)
forall (m :: * -> *) a b c r.
Monad m =>
ConduitM a b m () -> ConduitM b c m r -> ConduitM a c m r
.| ConduitM SyndicationPeriod o m (Maybe SyndicationPeriod)
forall (m :: * -> *) a o. Monad m => ConduitT a o m (Maybe a)
headC)
ZipConduit
ElementPiece o m (Maybe Int -> Maybe UTCTime -> SyndicationInfo)
-> ZipConduit ElementPiece o m (Maybe Int)
-> ZipConduit ElementPiece o m (Maybe UTCTime -> SyndicationInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ConduitT ElementPiece o m (Maybe Int)
-> ZipConduit ElementPiece o m (Maybe Int)
forall i o (m :: * -> *) r. ConduitT i o m r -> ZipConduit i o m r
ZipConduit (Traversal' ElementPiece Int -> ConduitT ElementPiece Int m ()
forall (m :: * -> *) a b.
Monad m =>
Traversal' a b -> ConduitT a b m ()
projectC Traversal' ElementPiece Int
_elementFrequency ConduitT ElementPiece Int m ()
-> ConduitM Int o m (Maybe Int)
-> ConduitT ElementPiece o m (Maybe Int)
forall (m :: * -> *) a b c r.
Monad m =>
ConduitM a b m () -> ConduitM b c m r -> ConduitM a c m r
.| ConduitM Int o m (Maybe Int)
forall (m :: * -> *) a o. Monad m => ConduitT a o m (Maybe a)
headC)
ZipConduit ElementPiece o m (Maybe UTCTime -> SyndicationInfo)
-> ZipConduit ElementPiece o m (Maybe UTCTime)
-> ZipConduit ElementPiece o m SyndicationInfo
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ConduitT ElementPiece o m (Maybe UTCTime)
-> ZipConduit ElementPiece o m (Maybe UTCTime)
forall i o (m :: * -> *) r. ConduitT i o m r -> ZipConduit i o m r
ZipConduit (Traversal' ElementPiece UTCTime
-> ConduitT ElementPiece UTCTime m ()
forall (m :: * -> *) a b.
Monad m =>
Traversal' a b -> ConduitT a b m ()
projectC Traversal' ElementPiece UTCTime
_elementBase ConduitT ElementPiece UTCTime m ()
-> ConduitM UTCTime o m (Maybe UTCTime)
-> ConduitT ElementPiece o m (Maybe UTCTime)
forall (m :: * -> *) a b c r.
Monad m =>
ConduitM a b m () -> ConduitM b c m r -> ConduitM a c m r
.| ConduitM UTCTime o m (Maybe UTCTime)
forall (m :: * -> *) a o. Monad m => ConduitT a o m (Maybe a)
headC)
piece :: [ConduitT Event o m (Maybe ElementPiece)]
piece = [ (SyndicationPeriod -> ElementPiece)
-> Maybe SyndicationPeriod -> Maybe ElementPiece
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap SyndicationPeriod -> ElementPiece
ElementPeriod (Maybe SyndicationPeriod -> Maybe ElementPiece)
-> ConduitT Event o m (Maybe SyndicationPeriod)
-> ConduitT Event o m (Maybe ElementPiece)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ConduitT Event o m (Maybe SyndicationPeriod)
forall (m :: * -> *) o.
MonadThrow m =>
ConduitT Event o m (Maybe SyndicationPeriod)
syndicationPeriod
, (Int -> ElementPiece) -> Maybe Int -> Maybe ElementPiece
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Int -> ElementPiece
ElementFrequency (Maybe Int -> Maybe ElementPiece)
-> ConduitT Event o m (Maybe Int)
-> ConduitT Event o m (Maybe ElementPiece)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ConduitT Event o m (Maybe Int)
forall (m :: * -> *) o.
MonadThrow m =>
ConduitT Event o m (Maybe Int)
syndicationFrequency
, (UTCTime -> ElementPiece) -> Maybe UTCTime -> Maybe ElementPiece
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap UTCTime -> ElementPiece
ElementBase (Maybe UTCTime -> Maybe ElementPiece)
-> ConduitT Event o m (Maybe UTCTime)
-> ConduitT Event o m (Maybe ElementPiece)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ConduitT Event o m (Maybe UTCTime)
forall (m :: * -> *) o.
MonadThrow m =>
ConduitT Event o m (Maybe UTCTime)
syndicationBase
]
syndicationPeriod :: MonadThrow m => ConduitT Event o m (Maybe SyndicationPeriod)
syndicationPeriod :: ConduitT Event o m (Maybe SyndicationPeriod)
syndicationPeriod = Text
-> ConduitT Event o m SyndicationPeriod
-> ConduitT Event o m (Maybe SyndicationPeriod)
forall (m :: * -> *) o a.
MonadThrow m =>
Text -> ConduitT Event o m a -> ConduitT Event o m (Maybe a)
syndicationTag Text
"updatePeriod" (ConduitT Event o m Text
forall (m :: * -> *) o. MonadThrow m => ConduitT Event o m Text
content ConduitT Event o m Text
-> (Text -> ConduitT Event o m SyndicationPeriod)
-> ConduitT Event o m SyndicationPeriod
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Text -> ConduitT Event o m SyndicationPeriod
forall (m :: * -> *). MonadThrow m => Text -> m SyndicationPeriod
asSyndicationPeriod)
syndicationFrequency :: MonadThrow m => ConduitT Event o m (Maybe Int)
syndicationFrequency :: ConduitT Event o m (Maybe Int)
syndicationFrequency = Text -> ConduitT Event o m Int -> ConduitT Event o m (Maybe Int)
forall (m :: * -> *) o a.
MonadThrow m =>
Text -> ConduitT Event o m a -> ConduitT Event o m (Maybe a)
syndicationTag Text
"updateFrequency" (ConduitT Event o m Text
forall (m :: * -> *) o. MonadThrow m => ConduitT Event o m Text
content ConduitT Event o m Text
-> (Text -> ConduitT Event o m Int) -> ConduitT Event o m Int
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Text -> ConduitT Event o m Int
forall (m :: * -> *). MonadThrow m => Text -> m Int
asInt)
syndicationBase :: MonadThrow m => ConduitT Event o m (Maybe UTCTime)
syndicationBase :: ConduitT Event o m (Maybe UTCTime)
syndicationBase = Text
-> ConduitT Event o m UTCTime -> ConduitT Event o m (Maybe UTCTime)
forall (m :: * -> *) o a.
MonadThrow m =>
Text -> ConduitT Event o m a -> ConduitT Event o m (Maybe a)
syndicationTag Text
"updateBase" (ConduitT Event o m Text
forall (m :: * -> *) o. MonadThrow m => ConduitT Event o m Text
content ConduitT Event o m Text
-> (Text -> ConduitT Event o m UTCTime)
-> ConduitT Event o m UTCTime
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Text -> ConduitT Event o m UTCTime
forall (m :: * -> *). MonadThrow m => Text -> m UTCTime
asDate)
renderSyndicationInfo :: Monad m => SyndicationInfo -> ConduitT () Event m ()
renderSyndicationInfo :: SyndicationInfo -> ConduitT () Event m ()
renderSyndicationInfo SyndicationInfo{Maybe Int
Maybe UTCTime
Maybe SyndicationPeriod
updateBase :: Maybe UTCTime
updateFrequency :: Maybe Int
updatePeriod :: Maybe SyndicationPeriod
updateBase :: SyndicationInfo -> Maybe UTCTime
updateFrequency :: SyndicationInfo -> Maybe Int
updatePeriod :: SyndicationInfo -> Maybe SyndicationPeriod
..} = do
Maybe SyndicationPeriod
-> (SyndicationPeriod -> ConduitT () Event m ())
-> ConduitT () Event m ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
t a -> (a -> m b) -> m ()
forM_ Maybe SyndicationPeriod
updatePeriod SyndicationPeriod -> ConduitT () Event m ()
forall (m :: * -> *).
Monad m =>
SyndicationPeriod -> ConduitT () Event m ()
renderSyndicationPeriod
Maybe Int
-> (Int -> ConduitT () Event m ()) -> ConduitT () Event m ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
t a -> (a -> m b) -> m ()
forM_ Maybe Int
updateFrequency Int -> ConduitT () Event m ()
forall (m :: * -> *). Monad m => Int -> ConduitT () Event m ()
renderSyndicationFrequency
Maybe UTCTime
-> (UTCTime -> ConduitT () Event m ()) -> ConduitT () Event m ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
t a -> (a -> m b) -> m ()
forM_ Maybe UTCTime
updateBase UTCTime -> ConduitT () Event m ()
forall (m :: * -> *). Monad m => UTCTime -> ConduitT () Event m ()
renderSyndicationBase
renderSyndicationPeriod :: Monad m => SyndicationPeriod -> ConduitT () Event m ()
renderSyndicationPeriod :: SyndicationPeriod -> ConduitT () Event m ()
renderSyndicationPeriod = Text -> Text -> ConduitT () Event m ()
forall (m :: * -> *).
Monad m =>
Text -> Text -> ConduitT () Event m ()
renderSyndicationTag Text
"updatePeriod" (Text -> ConduitT () Event m ())
-> (SyndicationPeriod -> Text)
-> SyndicationPeriod
-> ConduitT () Event m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SyndicationPeriod -> Text
fromSyndicationPeriod
renderSyndicationFrequency :: Monad m => Int -> ConduitT () Event m ()
renderSyndicationFrequency :: Int -> ConduitT () Event m ()
renderSyndicationFrequency = Text -> Text -> ConduitT () Event m ()
forall (m :: * -> *).
Monad m =>
Text -> Text -> ConduitT () Event m ()
renderSyndicationTag Text
"updateFrequency" (Text -> ConduitT () Event m ())
-> (Int -> Text) -> Int -> ConduitT () Event m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Text
forall a. Show a => a -> Text
tshow
renderSyndicationBase :: Monad m => UTCTime -> ConduitT () Event m ()
renderSyndicationBase :: UTCTime -> ConduitT () Event m ()
renderSyndicationBase = Text -> Text -> ConduitT () Event m ()
forall (m :: * -> *).
Monad m =>
Text -> Text -> ConduitT () Event m ()
renderSyndicationTag Text
"updateBase" (Text -> ConduitT () Event m ())
-> (UTCTime -> Text) -> UTCTime -> ConduitT () Event m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ZonedTime -> Text
forall t. TextualMonoid t => ZonedTime -> t
formatTimeRFC822 (ZonedTime -> Text) -> (UTCTime -> ZonedTime) -> UTCTime -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TimeZone -> UTCTime -> ZonedTime
utcToZonedTime TimeZone
utc
newtype SyndicationModule a = SyndicationModule a
instance ParseRssExtension a => ParseRssExtension (SyndicationModule a) where
parseRssChannelExtension :: ConduitT Event o m (RssChannelExtension (SyndicationModule a))
parseRssChannelExtension = ZipConduit Event o m (RssChannelExtension (SyndicationModule a))
-> ConduitT Event o m (RssChannelExtension (SyndicationModule a))
forall i o (m :: * -> *) r. ZipConduit i o m r -> ConduitT i o m r
getZipConduit (ZipConduit Event o m (RssChannelExtension (SyndicationModule a))
-> ConduitT Event o m (RssChannelExtension (SyndicationModule a)))
-> ZipConduit Event o m (RssChannelExtension (SyndicationModule a))
-> ConduitT Event o m (RssChannelExtension (SyndicationModule a))
forall a b. (a -> b) -> a -> b
$ SyndicationInfo
-> RssChannelExtension a
-> RssChannelExtension (SyndicationModule a)
forall a.
SyndicationInfo
-> RssChannelExtension a
-> RssChannelExtension (SyndicationModule a)
SyndicationChannel
(SyndicationInfo
-> RssChannelExtension a
-> RssChannelExtension (SyndicationModule a))
-> ZipConduit Event o m SyndicationInfo
-> ZipConduit
Event
o
m
(RssChannelExtension a
-> RssChannelExtension (SyndicationModule a))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ConduitT Event o m SyndicationInfo
-> ZipConduit Event o m SyndicationInfo
forall i o (m :: * -> *) r. ConduitT i o m r -> ZipConduit i o m r
ZipConduit ConduitT Event o m SyndicationInfo
forall (m :: * -> *) o.
MonadThrow m =>
ConduitT Event o m SyndicationInfo
syndicationInfo
ZipConduit
Event
o
m
(RssChannelExtension a
-> RssChannelExtension (SyndicationModule a))
-> ZipConduit Event o m (RssChannelExtension a)
-> ZipConduit Event o m (RssChannelExtension (SyndicationModule a))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> ConduitT Event o m (RssChannelExtension a)
-> ZipConduit Event o m (RssChannelExtension a)
forall i o (m :: * -> *) r. ConduitT i o m r -> ZipConduit i o m r
ZipConduit ConduitT Event o m (RssChannelExtension a)
forall a (m :: * -> *) o.
(ParseRssExtension a, MonadThrow m) =>
ConduitT Event o m (RssChannelExtension a)
parseRssChannelExtension
parseRssItemExtension :: ConduitT Event o m (RssItemExtension (SyndicationModule a))
parseRssItemExtension = RssItemExtension a -> RssItemExtension (SyndicationModule a)
forall a.
RssItemExtension a -> RssItemExtension (SyndicationModule a)
SyndicationItem (RssItemExtension a -> RssItemExtension (SyndicationModule a))
-> ConduitT Event o m (RssItemExtension a)
-> ConduitT Event o m (RssItemExtension (SyndicationModule a))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ConduitT Event o m (RssItemExtension a)
forall a (m :: * -> *) o.
(ParseRssExtension a, MonadThrow m) =>
ConduitT Event o m (RssItemExtension a)
parseRssItemExtension
instance RenderRssExtension a => RenderRssExtension (SyndicationModule a) where
renderRssChannelExtension :: RssChannelExtension (SyndicationModule a) -> ConduitT () Event m ()
renderRssChannelExtension SyndicationChannel{..} = do
SyndicationInfo -> ConduitT () Event m ()
forall (m :: * -> *).
Monad m =>
SyndicationInfo -> ConduitT () Event m ()
renderSyndicationInfo SyndicationInfo
channelSyndicationInfo
RssChannelExtension a -> ConduitT () Event m ()
forall e (m :: * -> *).
(RenderRssExtension e, Monad m) =>
RssChannelExtension e -> ConduitT () Event m ()
renderRssChannelExtension RssChannelExtension a
channelSyndicationOther
renderRssItemExtension :: RssItemExtension (SyndicationModule a) -> ConduitT () Event m ()
renderRssItemExtension (SyndicationItem a) = RssItemExtension a -> ConduitT () Event m ()
forall e (m :: * -> *).
(RenderRssExtension e, Monad m) =>
RssItemExtension e -> ConduitT () Event m ()
renderRssItemExtension RssItemExtension a
a
data instance (SyndicationModule a) = SyndicationChannel
{ RssChannelExtension (SyndicationModule a) -> SyndicationInfo
channelSyndicationInfo :: SyndicationInfo
, RssChannelExtension (SyndicationModule a) -> RssChannelExtension a
channelSyndicationOther :: RssChannelExtension a
}
deriving instance Eq (RssChannelExtension a) => Eq (RssChannelExtension (SyndicationModule a))
deriving instance Ord (RssChannelExtension a) => Ord (RssChannelExtension (SyndicationModule a))
deriving instance Read (RssChannelExtension a) => Read (RssChannelExtension (SyndicationModule a))
deriving instance Show (RssChannelExtension a) => Show (RssChannelExtension (SyndicationModule a))
deriving instance Generic (RssChannelExtension a) => Generic (RssChannelExtension (SyndicationModule a))
data instance (SyndicationModule a) = SyndicationItem { RssItemExtension (SyndicationModule a) -> RssItemExtension a
itemSyndicationOther :: RssItemExtension a }
deriving instance Eq (RssItemExtension a) => Eq (RssItemExtension (SyndicationModule a))
deriving instance Ord (RssItemExtension a) => Ord (RssItemExtension (SyndicationModule a))
deriving instance Read (RssItemExtension a) => Read (RssItemExtension (SyndicationModule a))
deriving instance Show (RssItemExtension a) => Show (RssItemExtension (SyndicationModule a))
deriving instance Generic (RssItemExtension a) => Generic (RssItemExtension (SyndicationModule a))