From 3003a18c9417db1962792d028d00c7c3db4f04c8 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 14 Aug 2022 08:51:37 +0100 Subject: [PATCH] dev: lib: hlint improvements --- hledger-lib/Hledger/Read/JournalReader.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hledger-lib/Hledger/Read/JournalReader.hs b/hledger-lib/Hledger/Read/JournalReader.hs index 290111e41..fcb0cc39a 100644 --- a/hledger-lib/Hledger/Read/JournalReader.hs +++ b/hledger-lib/Hledger/Read/JournalReader.hs @@ -513,10 +513,10 @@ formatdirectivep expectedsym = do printf "commodity directive symbol \"%s\" and format directive symbol \"%s\" should be the same" expectedsym acommodity keywordp :: String -> JournalParser m () -keywordp = (() <$) . string . fromString +keywordp = void . string . fromString spacesp :: JournalParser m () -spacesp = () <$ lift skipNonNewlineSpaces1 +spacesp = void $ lift skipNonNewlineSpaces1 -- | Backtracking parser similar to string, but allows varying amount of space between words keywordsp :: String -> JournalParser m () @@ -816,8 +816,8 @@ tests_JournalReader = testGroup "JournalReader" [ ] ,testCase "datetimep" $ do let - good = assertParse datetimep - bad = (\t -> assertParseError datetimep t "") + good = assertParse datetimep + bad t = assertParseError datetimep t "" good "2011/1/1 00:00" good "2011/1/1 23:59:59" bad "2011/1/1"