import Data.Default in Common
This commit is contained in:
parent
0fd5f257d0
commit
e8c376e0ad
19 changed files with 48 additions and 54 deletions
|
@ -28,12 +28,12 @@ checkFileMatcher :: (FileMatcher Annex) -> FilePath -> Annex Bool
|
|||
checkFileMatcher matcher file = checkMatcher matcher Nothing (Just file) S.empty True
|
||||
|
||||
checkMatcher :: (FileMatcher Annex) -> Maybe Key -> AssociatedFile -> AssumeNotPresent -> Bool -> Annex Bool
|
||||
checkMatcher matcher mkey afile notpresent def
|
||||
| isEmpty matcher = return def
|
||||
checkMatcher matcher mkey afile notpresent d
|
||||
| isEmpty matcher = return d
|
||||
| otherwise = case (mkey, afile) of
|
||||
(_, Just file) -> go =<< fileMatchInfo file
|
||||
(Just key, _) -> go (MatchingKey key)
|
||||
_ -> return def
|
||||
_ -> return d
|
||||
where
|
||||
go mi = matchMrun matcher $ \a -> a notpresent mi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue