diff options
| author | John MacFarlane <[email protected]> | 2025-12-12 10:32:17 +0100 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2025-12-12 10:32:17 +0100 |
| commit | d5e100eec2ecaddfb8f099b6dad5d0c7c05ac06b (patch) | |
| tree | 8b44c847034e99a2d37aea895141a168f602f132 /src/Text/Pandoc/Readers/JATS.hs | |
| parent | ff3eda71eb9567df679721c9bf506b0fecd25d9f (diff) | |
Fix imports to avoid warning about foldl'.
`foldl'` is exported by Prelude by base 4.20+. So we need to do
some qualified importing to avoid warnings about redundant imports.
Diffstat (limited to 'src/Text/Pandoc/Readers/JATS.hs')
| -rw-r--r-- | src/Text/Pandoc/Readers/JATS.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/JATS.hs b/src/Text/Pandoc/Readers/JATS.hs index 8f9951099..a1ea1d918 100644 --- a/src/Text/Pandoc/Readers/JATS.hs +++ b/src/Text/Pandoc/Readers/JATS.hs @@ -21,7 +21,7 @@ import Text.Pandoc.Error (PandocError(..)) import Data.Char (isDigit, isSpace) import Data.Default import Data.Generics -import Data.List (foldl', intersperse) +import qualified Data.List as L import qualified Data.Map as Map import Data.Maybe (maybeToList, fromMaybe, catMaybes) import Data.Text (Text) @@ -290,11 +290,11 @@ parseBlock (Elem e) = do let items = filterChildren (named "def") e' terms' <- mapM getInlines terms items' <- mapM getBlocks items - return (mconcat $ intersperse (str "; ") terms', items') + return (mconcat $ L.intersperse (str "; ") terms', items') parseFigure = do modify $ \st -> st{ jatsInFigure = True } capt <- case filterChild (named "caption") e of - Just t -> mconcat . intersperse linebreak <$> + Just t -> mconcat . L.intersperse linebreak <$> mapM getInlines (filterChildren (const True) t) Nothing -> return mempty contents <- getBlocks e @@ -350,7 +350,7 @@ parseBlock (Elem e) = do n <- safeRead $ "0" <> T.filter (\x -> isDigit x || x == '.') w if n > 0 then Just n else Nothing let firstBody = fromMaybe [] (headMay multipleBodyRowElements) - let numrows = foldl' max 0 $ map length firstBody + let numrows = L.foldl' max 0 $ map length firstBody let aligns = case colspecs of [] -> replicate numrows AlignDefault cs -> map toAlignment cs |
