From c1d14c539f5466dca243b69d2cfdd9ccb30cb91a Mon Sep 17 00:00:00 2001 From: Rhiannon Morris Date: Wed, 8 Jul 2020 05:27:38 +0200 Subject: [PATCH] use duplicate fields --- make-pages/Info.hs | 24 ++++++++++++------------ make-pages/make-pages.cabal | 1 + 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/make-pages/Info.hs b/make-pages/Info.hs index ecf0f0d..6d327ff 100644 --- a/make-pages/Info.hs +++ b/make-pages/Info.hs @@ -20,28 +20,28 @@ import Text.Read (readMaybe) data Info = Info { - infoDate :: !Day, - infoTitle :: !Text, - infoTags :: !(Vector Text), - infoDesc :: !Text, - infoImages :: !(Vector Image), - infoThumb :: !Text, - infoLinks :: !(Vector Link) + date :: !Day, + title :: !Text, + tags :: !(Vector Text), + description :: !Text, + images :: !(Vector Image), + thumb :: !Text, + links :: !(Vector Link) } deriving (Eq, Show) data Image = Image { - imageLabel :: !Text, - imagePath :: !Text, - imageNsfw :: !Bool + label :: !Text, + path :: !Text, + nsfw :: !Bool } deriving (Eq, Show) data Link = Link { - linkTitle :: !Text, - linkUrl :: !Text + title :: !Text, + url :: !Text } deriving (Eq, Show) diff --git a/make-pages/make-pages.cabal b/make-pages/make-pages.cabal index 9d1d10a..509acca 100644 --- a/make-pages/make-pages.cabal +++ b/make-pages/make-pages.cabal @@ -13,6 +13,7 @@ executable make-pages default-language: Haskell2010 default-extensions: BlockArguments, + DuplicateRecordFields, LambdaCase, OverloadedStrings, RecordWildCards