summaryrefslogtreecommitdiff
path: root/Git/Queue.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-12-20 14:37:53 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-12-20 14:37:53 -0400
commitee3b5b2a4279292d55af43c772cdfd0c56420798 (patch)
tree0227fb4732ef376ac9123a9a89b924793ed841e2 /Git/Queue.hs
parent6897460d350df41f1e98147f96fde1b66171bc19 (diff)
use Common in a few more modules
Diffstat (limited to 'Git/Queue.hs')
-rw-r--r--Git/Queue.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Git/Queue.hs b/Git/Queue.hs
index 73470b1f0..25c5b073c 100644
--- a/Git/Queue.hs
+++ b/Git/Queue.hs
@@ -7,7 +7,7 @@
module Git.Queue (
Queue,
- empty,
+ new,
add,
size,
full,
@@ -18,9 +18,9 @@ import qualified Data.Map as M
import System.IO
import System.Cmd.Utils
import Data.String.Utils
-import Control.Monad (forM_)
import Utility.SafeCommand
+import Common
import Git
import Git.Command
@@ -50,8 +50,8 @@ maxSize :: Int
maxSize = 10240
{- Constructor for empty queue. -}
-empty :: Queue
-empty = Queue 0 M.empty
+new :: Queue
+new = Queue 0 M.empty
{- Adds an action to a queue. -}
add :: Queue -> String -> [CommandParam] -> [FilePath] -> Queue
@@ -76,7 +76,7 @@ full (Queue n _) = n > maxSize
flush :: Queue -> Repo -> IO Queue
flush (Queue _ m) repo = do
forM_ (M.toList m) $ uncurry $ runAction repo
- return empty
+ return new
{- Runs an Action on a list of files in a git repository.
-