summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-01-09 18:23:58 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-01-09 18:23:58 -0400
commitc2b13a88bf2e8bdeb126e4f13a5aeb0fbe09a0c5 (patch)
treefc03a7fb1beefbbd2e4a6dffea4d27f8a3d123c3
parent9de1192c574dc304f3e9dbfd01296f74c7ea5969 (diff)
use concat
-rw-r--r--Command.hs2
-rw-r--r--GitRepo.hs2
2 files changed, 2 insertions, 2 deletions
diff --git a/Command.hs b/Command.hs
index b83e640b9..31bb1f1f9 100644
--- a/Command.hs
+++ b/Command.hs
@@ -64,7 +64,7 @@ data Command = Command {
prepCmd :: Command -> [String] -> Annex [Annex Bool]
prepCmd Command { cmdseek = seek } params = do
lists <- mapM (\s -> s params) seek
- return $ map doCommand $ foldl (++) [] lists
+ return $ map doCommand $ concat lists
{- Runs a command through the start, perform and cleanup stages -}
doCommand :: CommandStart -> CommandCleanup
diff --git a/GitRepo.hs b/GitRepo.hs
index 07f243b66..533038fc8 100644
--- a/GitRepo.hs
+++ b/GitRepo.hs
@@ -438,7 +438,7 @@ encodeGitFile s = foldl (++) "\"" (map echar s) ++ "\""
e_num c = showoctal $ ord c
-- unicode character is decomposed to
-- Word8s and each is shown in octal
- e_utf c = foldl (++) "" $ map showoctal $
+ e_utf c = concat $ map showoctal $
(encode [c] :: [Word8])