summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Command/Unused.hs4
-rw-r--r--GitQueue.hs4
-rw-r--r--Upgrade.hs4
3 files changed, 6 insertions, 6 deletions
diff --git a/Command/Unused.hs b/Command/Unused.hs
index fecfec742..d9f4e3978 100644
--- a/Command/Unused.hs
+++ b/Command/Unused.hs
@@ -7,7 +7,7 @@
module Command.Unused where
-import Control.Monad (filterM, unless)
+import Control.Monad (filterM, unless, forM_)
import Control.Monad.State (liftIO)
import qualified Data.Set as S
import Data.Maybe
@@ -88,7 +88,7 @@ unusedKeys = do
-- Tmp files that are dups of content already present can simply
-- be removed.
- liftIO $ mapM_ (\t -> removeFile $ gitAnnexTmpLocation g t) duptmp
+ liftIO $ forM_ duptmp $ \t -> removeFile $ gitAnnexTmpLocation g t
return (unused, staletmp)
diff --git a/GitQueue.hs b/GitQueue.hs
index 0cb64caef..4a777af4d 100644
--- a/GitQueue.hs
+++ b/GitQueue.hs
@@ -16,7 +16,7 @@ import qualified Data.Map as M
import System.IO
import System.Cmd.Utils
import Data.String.Utils
-import Control.Monad (unless)
+import Control.Monad (unless, forM_)
import qualified GitRepo as Git
@@ -45,7 +45,7 @@ add queue subcommand params file = M.insertWith (++) action [file] queue
{- Runs a queue on a git repository. -}
run :: Git.Repo -> Queue -> IO ()
run repo queue = do
- mapM_ (uncurry $ runAction repo) $ M.toList queue
+ forM_ (M.toList queue) $ uncurry $ runAction repo
return ()
{- Runs an Action on a list of files in a git repository.
diff --git a/Upgrade.hs b/Upgrade.hs
index 9c5a57a0c..b584b2666 100644
--- a/Upgrade.hs
+++ b/Upgrade.hs
@@ -10,7 +10,7 @@ module Upgrade where
import System.IO.Error (try)
import System.Directory
import Control.Monad.State (liftIO)
-import Control.Monad (filterM)
+import Control.Monad (filterM, forM_)
import System.Posix.Files
import System.FilePath
@@ -41,7 +41,7 @@ upgradeFrom0 = do
-- do the reorganisation of the files
let olddir = gitAnnexDir g
keys <- getKeysPresent0' olddir
- mapM_ (\k -> moveAnnex k $ olddir </> keyFile k) keys
+ forM_ keys $ \k -> moveAnnex k $ olddir </> keyFile k
-- update the symlinks to the files
files <- liftIO $ Git.inRepo g [Git.workTree g]