summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Man.hs
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2017-03-01 23:36:54 +0400
committerJohn MacFarlane <jgm@berkeley.edu>2017-03-01 20:36:54 +0100
commit39a8359b571ba0aa1e193b0ff9ef6252acc7a754 (patch)
treed222a0642b0dd379280a05b598101a53da816fba /src/Text/Pandoc/Writers/Man.hs
parentea619bfcb4dd58f4ea0f3b02a61dc734180b79b2 (diff)
Writers: Use gets to access MonadState where possible (#3480)
Diffstat (limited to 'src/Text/Pandoc/Writers/Man.hs')
-rw-r--r--src/Text/Pandoc/Writers/Man.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Man.hs b/src/Text/Pandoc/Writers/Man.hs
index f33acef32..9b46796af 100644
--- a/src/Text/Pandoc/Writers/Man.hs
+++ b/src/Text/Pandoc/Writers/Man.hs
@@ -82,10 +82,10 @@ pandocToMan opts (Pandoc meta blocks) = do
(fmap (render colwidth) . inlineListToMan opts)
$ deleteMeta "title" meta
body <- blockListToMan opts blocks
- notes <- liftM stNotes get
+ notes <- gets stNotes
notes' <- notesToMan opts (reverse notes)
let main = render' $ body $$ notes' $$ text ""
- hasTables <- liftM stHasTables get
+ hasTables <- gets stHasTables
let context = defField "body" main
$ setFieldsFromTitle
$ defField "has-tables" hasTables
@@ -376,6 +376,6 @@ inlineToMan opts (Image attr alternate (source, tit)) = do
inlineToMan _ (Note contents) = do
-- add to notes in state
modify $ \st -> st{ stNotes = contents : stNotes st }
- notes <- liftM stNotes get
+ notes <- gets stNotes
let ref = show $ (length notes)
return $ char '[' <> text ref <> char ']'