diff options
author | Henry de Valence <hdevalence@hdevalence.ca> | 2013-12-19 20:19:24 -0500 |
---|---|---|
committer | Henry de Valence <hdevalence@hdevalence.ca> | 2013-12-19 20:19:24 -0500 |
commit | 0c5e7cf8cb4fe6959d7e89880e8925afe6625414 (patch) | |
tree | 701879f6278cab45e0a56fcef0074e0523fb6a2f /src/Text/Pandoc/Parsing.hs | |
parent | 1ed2c467c9442934c060257f6e191a5a3d6c1e38 (diff) |
HLint: use `elem` and `notElem`
Replaces long conditional chains with calls to `elem` and `notElem`.
Diffstat (limited to 'src/Text/Pandoc/Parsing.hs')
-rw-r--r-- | src/Text/Pandoc/Parsing.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index e15854333..2f21e1253 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -271,7 +271,7 @@ spaceChar = satisfy $ \c -> c == ' ' || c == '\t' -- | Parses a nonspace, nonnewline character. nonspaceChar :: Parser [Char] st Char -nonspaceChar = satisfy $ \x -> x /= '\t' && x /= '\n' && x /= ' ' && x /= '\r' +nonspaceChar = satisfy $ flip notElem ['\t', '\n', ' ', '\r'] -- | Skips zero or more spaces or tabs. skipSpaces :: Parser [Char] st () @@ -1062,7 +1062,7 @@ doubleQuoteStart :: Parser [Char] ParserState () doubleQuoteStart = do failIfInQuoteContext InDoubleQuote try $ do charOrRef "\"\8220\147" - notFollowedBy (satisfy (\c -> c == ' ' || c == '\t' || c == '\n')) + notFollowedBy . satisfy $ flip elem [' ', '\t', '\n'] doubleQuoteEnd :: Parser [Char] st () doubleQuoteEnd = do |