From 3cd7bc98f6ee4878b044806744f5348d729289e9 Mon Sep 17 00:00:00 2001 From: Rhiannon Morris Date: Thu, 9 Jul 2020 06:18:53 +0200 Subject: [PATCH] record wild cards are bad actually --- make-pages/ImagePage.hs | 8 ++++---- make-pages/make-pages.cabal | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/make-pages/ImagePage.hs b/make-pages/ImagePage.hs index 0e37441..2935734 100644 --- a/make-pages/ImagePage.hs +++ b/make-pages/ImagePage.hs @@ -16,7 +16,7 @@ make :: Info -> Lazy.Text make = toLazyText . make' make' :: Info -> Builder -make' (Info {..}) = +make' (Info {date, title, tags, description, images, links}) = "\n" <> "\n" <> "\n" <> @@ -46,7 +46,7 @@ make' (Info {..}) = " back to gallery\n" <> "\n" where - path0 = let Image {..} = Vector.head images in fromText path + path0 = let Image {path} = Vector.head images in fromText path esc :: Strict.Text -> Builder @@ -62,7 +62,7 @@ formatDate :: Day -> Builder formatDate = fromString . formatTime defaultTimeLocale "%e %#B %Y" altButton :: Int -> Image -> Builder -altButton i (Image {..}) = +altButton i (Image {label, path, nsfw}) = "
  • \n" <> " checked <> "id=\"" <> idLabel <> "\" " <> "name=variant autocomplete=off\n" <> @@ -88,7 +88,7 @@ indent n txt = spaces <> go (Strict.unpack txt) where spaces = fromString $ replicate n ' ' extLink :: Link -> Builder -extLink (Link {..}) = +extLink (Link {title, url}) = "
  • \n" <> " fromText url <> "\">\n" <> " " <> fromText title <> "\n" <> diff --git a/make-pages/make-pages.cabal b/make-pages/make-pages.cabal index 7893cfa..7c175e6 100644 --- a/make-pages/make-pages.cabal +++ b/make-pages/make-pages.cabal @@ -15,8 +15,8 @@ executable make-pages BlockArguments, DuplicateRecordFields, LambdaCase, - OverloadedStrings, - RecordWildCards + NamedFieldPuns, + OverloadedStrings build-depends: base ^>= 4.12.0.0, containers ^>= 0.6.0.1,