From 59069598823d7ee354839c760794939941a7d40d Mon Sep 17 00:00:00 2001 From: Stephen Morgan Date: Mon, 16 Aug 2021 16:12:50 +1000 Subject: [PATCH] cln: hlint: Remove redundant case warnings. --- .hlint.yaml | 1 - hledger-ui/Hledger/UI/ErrorScreen.hs | 5 +++-- hledger-ui/Hledger/UI/TransactionScreen.hs | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.hlint.yaml b/.hlint.yaml index 27bf5a864..361296740 100644 --- a/.hlint.yaml +++ b/.hlint.yaml @@ -69,7 +69,6 @@ - ignore: {name: "Use newtype instead of data"} - ignore: {name: "Use elemIndex"} - ignore: {name: "Use =="} -- ignore: {name: "Redundant case"} - ignore: {name: "Use lambda-case"} - ignore: {name: "Redundant lambda"} - ignore: {name: "Replace case with fromMaybe"} diff --git a/hledger-ui/Hledger/UI/ErrorScreen.hs b/hledger-ui/Hledger/UI/ErrorScreen.hs index 178ddb50e..5f661f671 100644 --- a/hledger-ui/Hledger/UI/ErrorScreen.hs +++ b/hledger-ui/Hledger/UI/ErrorScreen.hs @@ -59,9 +59,10 @@ esDraw UIState{aopts=UIOpts{cliopts_=copts@CliOpts{}} withAttr ("border" <> "bold") (str "Oops. Please fix this problem then press g to reload") -- <+> (if ignore_assertions_ copts then withAttr ("border" <> "query") (str " ignoring") else str " not ignoring") - bottomlabel = case mode of + bottomlabel = quickhelp + -- case mode of -- Minibuffer ed -> minibuffer ed - _ -> quickhelp + -- _ -> quickhelp where quickhelp = borderKeysStr [ ("h", "help") diff --git a/hledger-ui/Hledger/UI/TransactionScreen.hs b/hledger-ui/Hledger/UI/TransactionScreen.hs index f7e7e8790..93667f1ba 100644 --- a/hledger-ui/Hledger/UI/TransactionScreen.hs +++ b/hledger-ui/Hledger/UI/TransactionScreen.hs @@ -113,9 +113,10 @@ tsDraw UIState{aopts=UIOpts{cliopts_=copts@CliOpts{reportspec_=rspec@ReportSpec{ [] -> str "" fs -> withAttr ("border" <> "query") (str $ " " ++ intercalate ", " fs) - bottomlabel = case mode of + bottomlabel = quickhelp + -- case mode of -- Minibuffer ed -> minibuffer ed - _ -> quickhelp + -- _ -> quickhelp where quickhelp = borderKeysStr [ ("?", "help")