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 =
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)

View file

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