From d760904982b54743658d3f3479af9c094f6a226a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Z=C3=A1rybnick=C3=BD?= Date: Sat, 9 Jun 2018 12:09:31 +0200 Subject: [PATCH] web: Replace RecordWildCards with NamedFieldPuns, remove unused parameters --- hledger-web/Foundation.hs | 8 ++++---- hledger-web/Handler/AddForm.hs | 4 ++-- hledger-web/Handler/Common.hs | 10 +++++----- hledger-web/Handler/JournalR.hs | 16 ++++++++-------- hledger-web/Handler/RegisterR.hs | 14 +++++++------- .../templates/default-layout-wrapper.hamlet | 2 +- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/hledger-web/Foundation.hs b/hledger-web/Foundation.hs index 782b5bfc0..52f535412 100644 --- a/hledger-web/Foundation.hs +++ b/hledger-web/Foundation.hs @@ -1,5 +1,5 @@ {-# OPTIONS_GHC -fno-warn-orphans #-} -{-# LANGUAGE CPP, LambdaCase, MultiParamTypeClasses, NamedFieldPuns, OverloadedStrings, RecordWildCards, QuasiQuotes, TemplateHaskell, TypeFamilies, TypeSynonymInstances, FlexibleInstances #-} +{-# LANGUAGE CPP, LambdaCase, MultiParamTypeClasses, NamedFieldPuns, OverloadedStrings, QuasiQuotes, TemplateHaskell, TypeFamilies, TypeSynonymInstances, FlexibleInstances #-} -- | Define the web application's foundation, in the usual Yesod style. -- See a default Yesod app's comments for more details of each part. @@ -87,7 +87,7 @@ instance Yesod App where defaultLayout widget = do master <- getYesod lastmsg <- getMessage - vd@VD{..} <- getViewData + VD{j, opts} <- getViewData -- We break up the default layout into two components: -- default-layout is the contents of the body tag, and @@ -237,8 +237,8 @@ getLastMessage = cached getMessage -- add form dialog, part of the default template -- | Add transaction form. -addform :: ViewData -> HtmlUrl AppRoute -addform VD{..} = [hamlet| +addform :: Journal -> HtmlUrl AppRoute +addform j = [hamlet|