diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-08-11 17:53:39 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-08-11 17:53:39 -0700 |
commit | 073895c340b85dc66b45e0c716d8357f8c7c5a13 (patch) | |
tree | 34c738a9983ec2bd4ad0f24fa8380ca43bacd942 /src/Text/Pandoc | |
parent | dd1a956a8aa7d0cadd37db1650698eee9274beee (diff) | |
download | pandoc-073895c340b85dc66b45e0c716d8357f8c7c5a13.tar.gz |
Fix some lint issues.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX/Macro.hs | 7 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX/Parsing.hs | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX/Macro.hs b/src/Text/Pandoc/Readers/LaTeX/Macro.hs index bd7979ef3..c5704c8ad 100644 --- a/src/Text/Pandoc/Readers/LaTeX/Macro.hs +++ b/src/Text/Pandoc/Readers/LaTeX/Macro.hs @@ -79,10 +79,9 @@ letmacro = do checkGlobal :: PandocMonad m => LP m [(Text, Macro)] -> LP m [(Text, Macro)] checkGlobal p = - (do controlSeq "global" - ms <- p - return $ map (\(n, Macro _ expand arg optarg contents) -> - (n, Macro GlobalScope expand arg optarg contents)) ms) + (controlSeq "global" *> + (map (\(n, Macro _ expand arg optarg contents) -> + (n, Macro GlobalScope expand arg optarg contents)) <$> p)) <|> p edefmacro :: PandocMonad m => LP m [(Text, Macro)] diff --git a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs index e1b72926f..075e1f656 100644 --- a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs +++ b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs @@ -224,8 +224,8 @@ instance HasIncludeFiles LaTeXState where instance HasMacros LaTeXState where extractMacros st = NonEmpty.head $ sMacros st - updateMacros f st = st{ sMacros = f (NonEmpty.head $ sMacros st) - :| (NonEmpty.tail $ sMacros st) } + updateMacros f st = st{ sMacros = f (NonEmpty.head (sMacros st)) + :| NonEmpty.tail (sMacros st) } instance HasReaderOptions LaTeXState where extractReaderOptions = sOptions |