aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2025-12-12 11:00:21 +0100
committerJohn MacFarlane <[email protected]>2025-12-12 11:00:21 +0100
commite7e1f13bcbe9d669a9834aae2b8f3cedc53fb631 (patch)
tree4a0e05fdcbf0c97dbabcd9d8eb35a4ff18785e83
parentd5e100eec2ecaddfb8f099b6dad5d0c7c05ac06b (diff)
Fix some more imports involving foldl'.
-rw-r--r--src/Text/Pandoc/Readers/Docx/Combine.hs12
-rw-r--r--src/Text/Pandoc/Readers/ODT/Arrows/State.hs3
2 files changed, 8 insertions, 7 deletions
diff --git a/src/Text/Pandoc/Readers/Docx/Combine.hs b/src/Text/Pandoc/Readers/Docx/Combine.hs
index ebaf7a7f6..c90ab7428 100644
--- a/src/Text/Pandoc/Readers/Docx/Combine.hs
+++ b/src/Text/Pandoc/Readers/Docx/Combine.hs
@@ -57,7 +57,7 @@ module Text.Pandoc.Readers.Docx.Combine ( smushInlines
)
where
-import Data.List
+import qualified Data.List as L
import Data.Bifunctor
import Data.Sequence ( ViewL (..), ViewR (..), viewl, viewr, spanr, spanl
, (><), (|>) )
@@ -135,9 +135,9 @@ combineSingletonInlines :: Inlines -> Inlines -> Inlines
combineSingletonInlines x y =
let (xfs, xs) = unstackInlines x
(yfs, ys) = unstackInlines y
- shared = xfs `intersect` yfs
- x_remaining = xfs \\ shared
- y_remaining = yfs \\ shared
+ shared = xfs `L.intersect` yfs
+ x_remaining = xfs L.\\ shared
+ y_remaining = yfs L.\\ shared
x_rem_attr = filter isAttrModifier x_remaining
y_rem_attr = filter isAttrModifier y_remaining
in
@@ -182,7 +182,7 @@ isAttrModifier _ = False
smushInlines :: [Inlines] -> Inlines
smushInlines xs = combineInlines xs' mempty
- where xs' = foldl' combineInlines mempty xs
+ where xs' = L.foldl' combineInlines mempty xs
smushBlocks :: [Blocks] -> Blocks
-smushBlocks xs = foldl' combineBlocks mempty xs
+smushBlocks xs = L.foldl' combineBlocks mempty xs
diff --git a/src/Text/Pandoc/Readers/ODT/Arrows/State.hs b/src/Text/Pandoc/Readers/ODT/Arrows/State.hs
index ef6986278..745cdcb99 100644
--- a/src/Text/Pandoc/Readers/ODT/Arrows/State.hs
+++ b/src/Text/Pandoc/Readers/ODT/Arrows/State.hs
@@ -33,6 +33,7 @@ module Text.Pandoc.Readers.ODT.Arrows.State
, iterateS'
) where
+import qualified Data.List as L
import Control.Arrow
import qualified Control.Category as Cat
import Control.Monad
@@ -135,7 +136,7 @@ iterateS a = ArrowState $ \(s,f) -> foldr a' (s,mzero) f
iterateSL :: (Foldable f, MonadPlus m)
=> ArrowState s x y
-> ArrowState s (f x) (m y)
-iterateSL a = ArrowState $ \(s,f) -> foldl' a' (s,mzero) f
+iterateSL a = ArrowState $ \(s,f) -> L.foldl' a' (s,mzero) f
where a' (s',m) x = second (mplus m.return) $ runArrowState a (s',x)