{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
module Hakyll.Convert.Common where
import Data.Data
import Data.Default
import Data.Text (Text)
import qualified Data.Text as T
import Data.Time.Clock (UTCTime)
import Data.Time.Clock.POSIX (posixSecondsToUTCTime)
data DistilledPost = DistilledPost
{ DistilledPost -> Text
dpUri :: T.Text,
DistilledPost -> Text
dpBody :: Text,
DistilledPost -> Maybe Text
dpTitle :: Maybe Text,
DistilledPost -> [Text]
dpTags :: [Text],
DistilledPost -> [Text]
dpCategories :: [Text],
DistilledPost -> UTCTime
dpDate :: UTCTime
}
deriving (Typeable DistilledPost
DataType
Constr
Typeable DistilledPost
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DistilledPost -> c DistilledPost)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DistilledPost)
-> (DistilledPost -> Constr)
-> (DistilledPost -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DistilledPost))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DistilledPost))
-> ((forall b. Data b => b -> b) -> DistilledPost -> DistilledPost)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DistilledPost -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DistilledPost -> r)
-> (forall u. (forall d. Data d => d -> u) -> DistilledPost -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> DistilledPost -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DistilledPost -> m DistilledPost)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DistilledPost -> m DistilledPost)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DistilledPost -> m DistilledPost)
-> Data DistilledPost
DistilledPost -> DataType
DistilledPost -> Constr
(forall b. Data b => b -> b) -> DistilledPost -> DistilledPost
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DistilledPost -> c DistilledPost
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DistilledPost
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> DistilledPost -> u
forall u. (forall d. Data d => d -> u) -> DistilledPost -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DistilledPost -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DistilledPost -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DistilledPost -> m DistilledPost
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DistilledPost -> m DistilledPost
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DistilledPost
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DistilledPost -> c DistilledPost
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DistilledPost)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DistilledPost)
$cDistilledPost :: Constr
$tDistilledPost :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> DistilledPost -> m DistilledPost
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DistilledPost -> m DistilledPost
gmapMp :: (forall d. Data d => d -> m d) -> DistilledPost -> m DistilledPost
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> DistilledPost -> m DistilledPost
gmapM :: (forall d. Data d => d -> m d) -> DistilledPost -> m DistilledPost
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> DistilledPost -> m DistilledPost
gmapQi :: Int -> (forall d. Data d => d -> u) -> DistilledPost -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> DistilledPost -> u
gmapQ :: (forall d. Data d => d -> u) -> DistilledPost -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> DistilledPost -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DistilledPost -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DistilledPost -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DistilledPost -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DistilledPost -> r
gmapT :: (forall b. Data b => b -> b) -> DistilledPost -> DistilledPost
$cgmapT :: (forall b. Data b => b -> b) -> DistilledPost -> DistilledPost
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DistilledPost)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c DistilledPost)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c DistilledPost)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c DistilledPost)
dataTypeOf :: DistilledPost -> DataType
$cdataTypeOf :: DistilledPost -> DataType
toConstr :: DistilledPost -> Constr
$ctoConstr :: DistilledPost -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DistilledPost
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c DistilledPost
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DistilledPost -> c DistilledPost
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DistilledPost -> c DistilledPost
$cp1Data :: Typeable DistilledPost
Data, Typeable)
instance Default DistilledPost where
def :: DistilledPost
def =
DistilledPost :: Text
-> Text
-> Maybe Text
-> [Text]
-> [Text]
-> UTCTime
-> DistilledPost
DistilledPost
{ dpUri :: Text
dpUri = Text
"",
dpBody :: Text
dpBody = Text
"",
dpTitle :: Maybe Text
dpTitle = Maybe Text
forall a. Maybe a
Nothing,
dpTags :: [Text]
dpTags = [],
dpCategories :: [Text]
dpCategories = [],
dpDate :: UTCTime
dpDate = POSIXTime -> UTCTime
posixSecondsToUTCTime POSIXTime
0
}