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/Class | |
parent | 39934c885144e6e7b443556ac9c9814ab8eaafd2 (diff) | |
download | pandoc-24191a2a278c0dec30bacd66b78cbb8cc8d91324.tar.gz |
Use foldl' instead of foldl everywhere.
Diffstat (limited to 'src/Text/Pandoc/Class')
-rw-r--r-- | src/Text/Pandoc/Class/PandocMonad.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Class/PandocMonad.hs b/src/Text/Pandoc/Class/PandocMonad.hs index 86c8de79e..293a822a0 100644 --- a/src/Text/Pandoc/Class/PandocMonad.hs +++ b/src/Text/Pandoc/Class/PandocMonad.hs @@ -59,6 +59,7 @@ import Control.Monad.Except (MonadError (catchError, throwError), MonadTrans, lift, when) import Data.Digest.Pure.SHA (sha1, showDigest) import Data.Maybe (fromMaybe) +import Data.List (foldl') import Data.Time (UTCTime) import Data.Time.Clock.POSIX (POSIXTime, utcTimeToPOSIXSeconds, posixSecondsToUTCTime) @@ -612,7 +613,7 @@ checkExistence fn = do -- | Canonicalizes a file path by removing redundant @.@ and @..@. makeCanonical :: FilePath -> FilePath makeCanonical = Posix.joinPath . transformPathParts . splitDirectories - where transformPathParts = reverse . foldl go [] + where transformPathParts = reverse . foldl' go [] go as "." = as go (_:as) ".." = as go as x = x : as |