cln: hlint: Remove rendundant guard warnings.

This commit is contained in:
Stephen Morgan 2021-08-16 15:21:49 +10:00 committed by Simon Michael
parent e666bbcaf0
commit 7edcbe4be8
4 changed files with 5 additions and 6 deletions

View File

@ -16,7 +16,6 @@
- ignore: {name: "Use <$>"} - ignore: {name: "Use <$>"}
- ignore: {name: "Unused LANGUAGE pragma"} - ignore: {name: "Unused LANGUAGE pragma"}
- ignore: {name: "Redundant bracket"} - ignore: {name: "Redundant bracket"}
- ignore: {name: "Redundant guard"}
- ignore: {name: "Avoid reverse"} - ignore: {name: "Avoid reverse"}
- ignore: {name: "Eta reduce"} - ignore: {name: "Eta reduce"}
- ignore: {name: "Use $>"} - ignore: {name: "Use $>"}

View File

@ -663,9 +663,9 @@ main = do
-- With -n/--dry-run, print new content to stdout instead of -- With -n/--dry-run, print new content to stdout instead of
-- updating the changelog. -- updating the changelog.
-- --
phonys (\out -> if phonys (\out -> if out `notElem` changelogs
| not $ out `elem` changelogs -> Nothing then Nothing
| otherwise -> Just $ do else Just $ do
tags <- lines . fromStdout <$> (cmd Shell "git tag" :: Action (Stdout String)) tags <- lines . fromStdout <$> (cmd Shell "git tag" :: Action (Stdout String))
oldlines <- liftIO $ lines <$> readFileStrictly out oldlines <- liftIO $ lines <$> readFileStrictly out
let let

View File

@ -100,7 +100,7 @@ main = do
let balreport = balanceReportFromMultiBalanceReport ropts (queryFromOpts d ropts) j let balreport = balanceReportFromMultiBalanceReport ropts (queryFromOpts d ropts) j
let go -- | "--help" `elem` (rawopts_ $ cliopts_ chopts) = putStr (showModeHelp chartmode) >> exitSuccess let go -- | "--help" `elem` (rawopts_ $ cliopts_ chopts) = putStr (showModeHelp chartmode) >> exitSuccess
-- | "--version" `elem` (rawopts_ $ cliopts_ chopts) = putStrLn progversion >> exitSuccess -- | "--version" `elem` (rawopts_ $ cliopts_ chopts) = putStrLn progversion >> exitSuccess
| otherwise = withJournalAndChartOptsDo chopts (writeChart balreport) = withJournalAndChartOptsDo chopts (writeChart balreport)
go go
-- copied from hledger-web -- copied from hledger-web

View File

@ -89,7 +89,7 @@ splitTransactionPostings :: Query -> AccountName -> [Day] -> Transaction -> ([Da
splitTransactionPostings _q acct dates t splitTransactionPostings _q acct dates t
-- | q `matchesTransaction` t = (dates', t') -- | q `matchesTransaction` t = (dates', t')
-- | otherwise = (dates, t) -- | otherwise = (dates, t)
| otherwise = (dates', t') = (dates', t')
where where
(dates', pss') = mapAccumL (splitPosting acct) dates $ tpostings t (dates', pss') = mapAccumL (splitPosting acct) dates $ tpostings t
t' = txnTieKnot t{tpostings=concat pss'} t' = txnTieKnot t{tpostings=concat pss'}