use duplicate fields

This commit is contained in:
Rhiannon Morris 2020-07-08 05:27:38 +02:00
parent c80555b72c
commit c1d14c539f
2 changed files with 13 additions and 12 deletions

View file

@ -20,28 +20,28 @@ import Text.Read (readMaybe)
data Info = data Info =
Info { Info {
infoDate :: !Day, date :: !Day,
infoTitle :: !Text, title :: !Text,
infoTags :: !(Vector Text), tags :: !(Vector Text),
infoDesc :: !Text, description :: !Text,
infoImages :: !(Vector Image), images :: !(Vector Image),
infoThumb :: !Text, thumb :: !Text,
infoLinks :: !(Vector Link) links :: !(Vector Link)
} }
deriving (Eq, Show) deriving (Eq, Show)
data Image = data Image =
Image { Image {
imageLabel :: !Text, label :: !Text,
imagePath :: !Text, path :: !Text,
imageNsfw :: !Bool nsfw :: !Bool
} }
deriving (Eq, Show) deriving (Eq, Show)
data Link = data Link =
Link { Link {
linkTitle :: !Text, title :: !Text,
linkUrl :: !Text url :: !Text
} }
deriving (Eq, Show) deriving (Eq, Show)

View file

@ -13,6 +13,7 @@ executable make-pages
default-language: Haskell2010 default-language: Haskell2010
default-extensions: default-extensions:
BlockArguments, BlockArguments,
DuplicateRecordFields,
LambdaCase, LambdaCase,
OverloadedStrings, OverloadedStrings,
RecordWildCards RecordWildCards