hlint suggestions.
This commit is contained in:
parent
7a924ec55a
commit
e77d08e439
4 changed files with 7 additions and 8 deletions
|
@ -120,6 +120,6 @@ parseBCP47 lang =
|
|||
P.char 'x'
|
||||
P.char '-'
|
||||
cs <- P.many1 $ P.satisfy (\c -> isAscii c && isAlphaNum c)
|
||||
guard $ length cs >= 1 && length cs <= 8
|
||||
guard $ not (null cs) && length cs <= 8
|
||||
let var = "x-" ++ cs
|
||||
return $ map toLower var
|
||||
|
|
|
@ -79,7 +79,7 @@ pCSVQuotedCell opts = do
|
|||
return $ T.pack res
|
||||
|
||||
escaped :: CSVOptions -> Parser Char
|
||||
escaped opts = do
|
||||
escaped opts =
|
||||
case csvEscape opts of
|
||||
Nothing -> try $ char (csvQuote opts) >> char (csvQuote opts)
|
||||
Just c -> try $ char c >> noneOf "\r\n"
|
||||
|
|
|
@ -121,10 +121,9 @@ import Data.ByteString.Base64 (decodeLenient)
|
|||
import Network.URI ( escapeURIString, nonStrictRelativeTo,
|
||||
unEscapeString, parseURIReference, isAllowedInURI,
|
||||
parseURI, URI(..) )
|
||||
import Network.HTTP.Client (httpLbs, responseBody, responseHeaders,
|
||||
Request(port,host,requestHeaders))
|
||||
import Network.HTTP.Client (parseRequest)
|
||||
import Network.HTTP.Client (newManager)
|
||||
import Network.HTTP.Client
|
||||
(httpLbs, responseBody, responseHeaders,
|
||||
Request(port, host, requestHeaders), parseRequest, newManager)
|
||||
import Network.HTTP.Client.Internal (addProxy)
|
||||
import Network.HTTP.Client.TLS (tlsManagerSettings)
|
||||
import System.Environment (getEnv)
|
||||
|
@ -432,7 +431,7 @@ getTranslations = do
|
|||
report $ CouldNotLoadTranslations (renderLang lang)
|
||||
$ case e of
|
||||
PandocCouldNotFindDataFileError _ ->
|
||||
("data file " ++ fallbackFile ++ " not found")
|
||||
"data file " ++ fallbackFile ++ " not found"
|
||||
_ -> ""
|
||||
-- make sure we don't try again...
|
||||
modifyCommonState $ \st -> st{ stTranslations = Nothing }
|
||||
|
|
|
@ -91,7 +91,7 @@ highlight syntaxmap formatter (_, classes, keyvals) rawCode =
|
|||
, traceOutput = False }
|
||||
classes' = map T.pack classes
|
||||
rawCode' = T.pack rawCode
|
||||
in case msum (map ((`lookupSyntax` syntaxmap)) classes') of
|
||||
in case msum (map (`lookupSyntax` syntaxmap) classes') of
|
||||
Nothing
|
||||
| numberLines fmtOpts -> Right
|
||||
$ formatter fmtOpts{ codeClasses = [],
|
||||
|
|
Loading…
Add table
Reference in a new issue