diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-03-15 10:37:35 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-03-15 10:37:35 -0700 |
commit | 24191a2a278c0dec30bacd66b78cbb8cc8d91324 (patch) | |
tree | 0cba7f763387ae545729ab574a858ce44e9fad30 /src/Text/Pandoc/Lua | |
parent | 39934c885144e6e7b443556ac9c9814ab8eaafd2 (diff) | |
download | pandoc-24191a2a278c0dec30bacd66b78cbb8cc8d91324.tar.gz |
Use foldl' instead of foldl everywhere.
Diffstat (limited to 'src/Text/Pandoc/Lua')
-rw-r--r-- | src/Text/Pandoc/Lua/Filter.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Lua/Filter.hs b/src/Text/Pandoc/Lua/Filter.hs index bffe01a34..90967f295 100644 --- a/src/Text/Pandoc/Lua/Filter.hs +++ b/src/Text/Pandoc/Lua/Filter.hs @@ -22,6 +22,7 @@ import Control.Monad.Catch (finally, try) import Data.Data (Data, DataType, dataTypeConstrs, dataTypeName, dataTypeOf, showConstr, toConstr, tyconUQname) import Data.Foldable (foldrM) +import Data.List (foldl') import Data.Map (Map) import Data.Maybe (fromMaybe) import Foreign.Lua (Lua, Peekable, Pushable, StackIndex) @@ -204,7 +205,7 @@ walkMeta lf (Pandoc m bs) = do walkPandoc :: LuaFilter -> Pandoc -> Lua Pandoc walkPandoc (LuaFilter fnMap) = - case foldl mplus Nothing (map (`Map.lookup` fnMap) pandocFilterNames) of + case foldl' mplus Nothing (map (`Map.lookup` fnMap) pandocFilterNames) of Just fn -> \x -> runFilterFunction fn x *> singleElement x Nothing -> return |