dev: lib: hlint improvements
This commit is contained in:
parent
a3096d0549
commit
3003a18c94
@ -513,10 +513,10 @@ formatdirectivep expectedsym = do
|
|||||||
printf "commodity directive symbol \"%s\" and format directive symbol \"%s\" should be the same" expectedsym acommodity
|
printf "commodity directive symbol \"%s\" and format directive symbol \"%s\" should be the same" expectedsym acommodity
|
||||||
|
|
||||||
keywordp :: String -> JournalParser m ()
|
keywordp :: String -> JournalParser m ()
|
||||||
keywordp = (() <$) . string . fromString
|
keywordp = void . string . fromString
|
||||||
|
|
||||||
spacesp :: JournalParser m ()
|
spacesp :: JournalParser m ()
|
||||||
spacesp = () <$ lift skipNonNewlineSpaces1
|
spacesp = void $ lift skipNonNewlineSpaces1
|
||||||
|
|
||||||
-- | Backtracking parser similar to string, but allows varying amount of space between words
|
-- | Backtracking parser similar to string, but allows varying amount of space between words
|
||||||
keywordsp :: String -> JournalParser m ()
|
keywordsp :: String -> JournalParser m ()
|
||||||
@ -817,7 +817,7 @@ tests_JournalReader = testGroup "JournalReader" [
|
|||||||
,testCase "datetimep" $ do
|
,testCase "datetimep" $ do
|
||||||
let
|
let
|
||||||
good = assertParse datetimep
|
good = assertParse datetimep
|
||||||
bad = (\t -> assertParseError datetimep t "")
|
bad t = assertParseError datetimep t ""
|
||||||
good "2011/1/1 00:00"
|
good "2011/1/1 00:00"
|
||||||
good "2011/1/1 23:59:59"
|
good "2011/1/1 23:59:59"
|
||||||
bad "2011/1/1"
|
bad "2011/1/1"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user