use Common in a few more modules
This commit is contained in:
parent
6897460d35
commit
ee3b5b2a42
8 changed files with 30 additions and 31 deletions
10
Git/Queue.hs
10
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.
|
||||
-
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue