git.iko.soy/typeable/pandoc
on master help sign in
HLint: redundant parens

Remove parens enclosing a single element.

commitf6d151889c8fff303be8ee8a4f9be67a04de9210 authorHenry de Valence <hdevalence@hdevalence.ca> dateThu 19 Dec 2013, 20:43 (13 years ago) parentc35f5ba
8 files changed+10−12
pandoc.hs+2−4 src/Text/Pandoc/Readers/Markdown.hs+1−1 src/Text/Pandoc/Readers/Textile.hs+1−1 src/Text/Pandoc/Writers/HTML.hs+1−1 src/Text/Pandoc/Writers/MediaWiki.hs+1−1 src/Text/Pandoc/Writers/Textile.hs+1−1 tests/Tests/Readers/LaTeX.hs+1−1 tests/Tests/Readers/Markdown.hs+2−2
pandoc.hs+2−4
@@ -1034,12 +1034,10 @@ main = do
10341034
10351035 variables' <- case mathMethod of
10361036 LaTeXMathML Nothing -> do
1037− s <- readDataFileUTF8 datadir
1038− ("LaTeXMathML.js")
1037+ s <- readDataFileUTF8 datadir "LaTeXMathML.js"
10391038 return $ ("mathml-script", s) : variables
10401039 MathML Nothing -> do
1041− s <- readDataFileUTF8 datadir
1042− ("MathMLinHTML.js")
1040+ s <- readDataFileUTF8 datadir "MathMLinHTML.js"
10431041 return $ ("mathml-script", s) : variables
10441042 _ -> return variables
10451043
src/Text/Pandoc/Readers/Markdown.hs+1−1
@@ -730,7 +730,7 @@ listStart = bulletListStart <|> (anyOrderedListStart >> return ())
730730listLine :: MarkdownParser String
731731listLine = try $ do
732732 notFollowedBy' (do indentSpaces
733− many (spaceChar)
733+ many spaceChar
734734 listStart)
735735 notFollowedBy' $ htmlTag (~== TagClose "div")
736736 chunks <- manyTill
src/Text/Pandoc/Readers/Textile.hs+1−1
@@ -594,7 +594,7 @@ surrounded border = enclosed (border *> notFollowedBy (oneOf " \t\n\r")) (try bo
594594simpleInline :: Parser [Char] ParserState t -- ^ surrounding parser
595595 -> ([Inline] -> Inline) -- ^ Inline constructor
596596 -> Parser [Char] ParserState Inline -- ^ content parser (to be used repeatedly)
597−simpleInline border construct = surrounded border (inlineWithAttribute) >>=
597+simpleInline border construct = surrounded border inlineWithAttribute >>=
598598 return . construct . normalizeSpaces
599599 where inlineWithAttribute = (try $ optional attributes) >> inline
600600
src/Text/Pandoc/Writers/HTML.hs+1−1
@@ -524,7 +524,7 @@ blockToHtml opts (DefinitionList lst) = do
524524 contents <- mapM (\(term, defs) ->
525525 do term' <- if null term
526526 then return mempty
527− else liftM (H.dt) $ inlineListToHtml opts term
527+ else liftM H.dt $ inlineListToHtml opts term
528528 defs' <- mapM ((liftM (\x -> H.dd $ (x >> nl opts))) .
529529 blockListToHtml opts) defs
530530 return $ mconcat $ nl opts : term' : nl opts :
src/Text/Pandoc/Writers/MediaWiki.hs+1−1
@@ -51,7 +51,7 @@ data WriterState = WriterState {
5151writeMediaWiki :: WriterOptions -> Pandoc -> String
5252writeMediaWiki opts document =
5353 evalState (pandocToMediaWiki opts document)
54− (WriterState { stNotes = False, stListLevel = [], stUseTags = False })
54+ WriterState { stNotes = False, stListLevel = [], stUseTags = False }
5555
5656-- | Return MediaWiki representation of document.
5757pandocToMediaWiki :: WriterOptions -> Pandoc -> State WriterState String
src/Text/Pandoc/Writers/Textile.hs+1−1
@@ -51,7 +51,7 @@ data WriterState = WriterState {
5151writeTextile :: WriterOptions -> Pandoc -> String
5252writeTextile opts document =
5353 evalState (pandocToTextile opts document)
54− (WriterState { stNotes = [], stListLevel = [], stUseTags = False })
54+ WriterState { stNotes = [], stListLevel = [], stUseTags = False }
5555
5656-- | Return Textile representation of document.
5757pandocToTextile :: WriterOptions -> Pandoc -> State WriterState String
tests/Tests/Readers/LaTeX.hs+1−1
@@ -21,7 +21,7 @@ tests = [ testGroup "basic"
2121 [ "simple" =:
2222 "word" =?> para "word"
2323 , "space" =:
24− "some text" =?> para ("some text")
24+ "some text" =?> para "some text"
2525 , "emphasized" =:
2626 "\\emph{emphasized}" =?> para (emph "emphasized")
2727 ]
tests/Tests/Readers/Markdown.hs+2−2
@@ -171,13 +171,13 @@ tests = [ testGroup "inline code"
171171 , testGroup "smart punctuation"
172172 [ test markdownSmart "quote before ellipses"
173173 ("'...hi'"
174− =?> para (singleQuoted ("…hi")))
174+ =?> para (singleQuoted "…hi"))
175175 , test markdownSmart "apostrophe before emph"
176176 ("D'oh! A l'*aide*!"
177177 =?> para ("D’oh! A l’" <> emph "aide" <> "!"))
178178 , test markdownSmart "apostrophe in French"
179179 ("À l'arrivée de la guerre, le thème de l'«impossibilité du socialisme»"
180− =?> para ("À l’arrivée de la guerre, le thème de l’«impossibilité du socialisme»"))
180+ =?> para "À l’arrivée de la guerre, le thème de l’«impossibilité du socialisme»")
181181 ]
182182 , testGroup "mixed emphasis and strong"
183183 [ "emph and strong emph alternating" =: