simplify
This commit is contained in:
parent
1448d8b42d
commit
ef85e699ba
1 changed files with 2 additions and 4 deletions
6
UUID.hs
6
UUID.hs
|
@ -24,8 +24,6 @@ module UUID (
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Monad.State
|
import Control.Monad.State
|
||||||
import Data.Maybe
|
|
||||||
import Data.List
|
|
||||||
import System.Cmd.Utils
|
import System.Cmd.Utils
|
||||||
import System.IO
|
import System.IO
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
|
@ -85,7 +83,7 @@ reposByUUID repos uuids = filterM match repos
|
||||||
where
|
where
|
||||||
match r = do
|
match r = do
|
||||||
u <- getUUID r
|
u <- getUUID r
|
||||||
return $ isJust $ elemIndex u uuids
|
return $ elem u uuids
|
||||||
|
|
||||||
{- Filters a list of repos to ones that do not have the listed UUIDs. -}
|
{- Filters a list of repos to ones that do not have the listed UUIDs. -}
|
||||||
reposWithoutUUID :: [Git.Repo] -> [UUID] -> Annex [Git.Repo]
|
reposWithoutUUID :: [Git.Repo] -> [UUID] -> Annex [Git.Repo]
|
||||||
|
@ -93,7 +91,7 @@ reposWithoutUUID repos uuids = filterM unmatch repos
|
||||||
where
|
where
|
||||||
unmatch r = do
|
unmatch r = do
|
||||||
u <- getUUID r
|
u <- getUUID r
|
||||||
return $ not $ isJust $ elemIndex u uuids
|
return $ not $ elem u uuids
|
||||||
|
|
||||||
{- Pretty-prints a list of UUIDs -}
|
{- Pretty-prints a list of UUIDs -}
|
||||||
prettyPrintUUIDs :: [UUID] -> Annex String
|
prettyPrintUUIDs :: [UUID] -> Annex String
|
||||||
|
|
Loading…
Reference in a new issue