From 602cd6a327ad41e68e47689d3842f349cf33444d Mon Sep 17 00:00:00 2001
From: Albert Krewinkel <albert@zeitkraut.de>
Date: Tue, 16 May 2017 22:49:52 +0200
Subject: [PATCH] Org reader: replace `sequence . map` with `mapM`

---
 src/Text/Pandoc/Readers/Org/Blocks.hs       | 2 +-
 src/Text/Pandoc/Readers/Org/DocumentTree.hs | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Text/Pandoc/Readers/Org/Blocks.hs b/src/Text/Pandoc/Readers/Org/Blocks.hs
index acede0c77..8c78e5157 100644
--- a/src/Text/Pandoc/Readers/Org/Blocks.hs
+++ b/src/Text/Pandoc/Readers/Org/Blocks.hs
@@ -65,7 +65,7 @@ blockList = do
   initialBlocks  <- blocks
   headlines      <- sequence <$> manyTill (headline blocks inline 1) eof
   st             <- getState
-  headlineBlocks <- fmap mconcat . sequence . map headlineToBlocks $ runF headlines st
+  headlineBlocks <- fmap mconcat . mapM headlineToBlocks $ runF headlines st
   return . B.toList $ (runF initialBlocks st) <> headlineBlocks
 
 -- | Get the meta information saved in the state.
diff --git a/src/Text/Pandoc/Readers/Org/DocumentTree.hs b/src/Text/Pandoc/Readers/Org/DocumentTree.hs
index 3e2a046d4..53ec2ef57 100644
--- a/src/Text/Pandoc/Readers/Org/DocumentTree.hs
+++ b/src/Text/Pandoc/Readers/Org/DocumentTree.hs
@@ -164,7 +164,7 @@ headlineToHeaderWithList :: Monad m => Headline -> OrgParser m Blocks
 headlineToHeaderWithList hdln@(Headline {..}) = do
   maxHeadlineLevels <- getExportSetting exportHeadlineLevels
   header        <- headlineToHeader hdln
-  listElements  <- sequence (map headlineToBlocks headlineChildren)
+  listElements  <- mapM headlineToBlocks headlineChildren
   let listBlock  = if null listElements
                    then mempty
                    else B.orderedList listElements
@@ -182,7 +182,7 @@ headlineToHeaderWithList hdln@(Headline {..}) = do
 headlineToHeaderWithContents :: Monad m => Headline -> OrgParser m Blocks
 headlineToHeaderWithContents hdln@(Headline {..}) = do
   header         <- headlineToHeader hdln
-  childrenBlocks <- mconcat <$> sequence (map headlineToBlocks headlineChildren)
+  childrenBlocks <- mconcat <$> mapM headlineToBlocks headlineChildren
   return $ header <> headlineContents <> childrenBlocks
 
 headlineToHeader :: Monad m => Headline -> OrgParser m Blocks