git.iko.soy/typeable/pandoc
on master help sign in
Org reader: replace `sequence . map` with `mapM`
commit602cd6a327ad41e68e47689d3842f349cf33444d authorAlbert Krewinkel <albert@zeitkraut.de> dateTue 16 May 2017, 22:49 (9 years ago) parenta27e2e8
2 files changed+3−3
src/Text/Pandoc/Readers/Org/Blocks.hs+1−1 src/Text/Pandoc/Readers/Org/DocumentTree.hs+2−2
src/Text/Pandoc/Readers/Org/Blocks.hs+1−1
@@ -65,7 +65,7 @@ blockList = do
6565 initialBlocks <- blocks
6666 headlines <- sequence <$> manyTill (headline blocks inline 1) eof
6767 st <- getState
68− headlineBlocks <- fmap mconcat . sequence . map headlineToBlocks $ runF headlines st
68+ headlineBlocks <- fmap mconcat . mapM headlineToBlocks $ runF headlines st
6969 return . B.toList $ (runF initialBlocks st) <> headlineBlocks
7070
7171-- | Get the meta information saved in the state.
src/Text/Pandoc/Readers/Org/DocumentTree.hs+2−2
@@ -164,7 +164,7 @@ headlineToHeaderWithList :: Monad m => Headline -> OrgParser m Blocks
164164headlineToHeaderWithList hdln@(Headline {..}) = do
165165 maxHeadlineLevels <- getExportSetting exportHeadlineLevels
166166 header <- headlineToHeader hdln
167− listElements <- sequence (map headlineToBlocks headlineChildren)
167+ listElements <- mapM headlineToBlocks headlineChildren
168168 let listBlock = if null listElements
169169 then mempty
170170 else B.orderedList listElements
@@ -182,7 +182,7 @@ headlineToHeaderWithList hdln@(Headline {..}) = do
182182headlineToHeaderWithContents :: Monad m => Headline -> OrgParser m Blocks
183183headlineToHeaderWithContents hdln@(Headline {..}) = do
184184 header <- headlineToHeader hdln
185− childrenBlocks <- mconcat <$> sequence (map headlineToBlocks headlineChildren)
185+ childrenBlocks <- mconcat <$> mapM headlineToBlocks headlineChildren
186186 return $ header <> headlineContents <> childrenBlocks
187187
188188headlineToHeader :: Monad m => Headline -> OrgParser m Blocks