From 6cd77d4c638012be63d66882403804aa28feb6ed Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Fri, 7 Feb 2020 10:15:57 +0100 Subject: Resolve HLint warnings All warnings are either fixed or, if more appropriate, HLint is configured to ignore them. HLint suggestions remain. * Ignore "Use camelCase" warnings in Lua and legacy code * Fix or ignore remaining HLint warnings * Remove redundant brackets * Remove redundant `return`s * Remove redundant as-pattern * Fuse mapM_/map * Use `.` to shorten code * Remove redundant `fmap` * Remove unused LANGUAGE pragmas * Hoist `not` in Text.Pandoc.App * Use fewer imports for `Text.DocTemplates` * Remove redundant `do`s * Remove redundant `$`s * Jira reader: remove unnecessary parentheses --- src/Text/Pandoc/Readers/LaTeX/Parsing.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc/Readers/LaTeX/Parsing.hs') diff --git a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs index 5630ed868..a6836c3c1 100644 --- a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs +++ b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs @@ -391,7 +391,7 @@ doMacros = do updateState $ \st -> st{ sExpanded = True } doMacros' :: PandocMonad m => Int -> [Tok] -> LP m [Tok] -doMacros' n inp = do +doMacros' n inp = case inp of Tok spos (CtrlSeq "begin") _ : Tok _ Symbol "{" : Tok _ Word name : Tok _ Symbol "}" : ts @@ -456,7 +456,7 @@ doMacros' n inp = do args <- case optarg of Nothing -> getargs M.empty argspecs Just o -> do - x <- option o $ bracketedToks + x <- option o bracketedToks getargs (M.singleton 1 x) $ drop 1 argspecs rest <- getInput return (args, rest) -- cgit v1.2.3