avoid duplicate code with a more generic monadic matcher
Interesting type signature ghc derived for this: forall o (m :: * -> *). Monad m => Matcher o -> (o -> m Bool) -> m Bool
This commit is contained in:
parent
902ef88266
commit
c78975babb
2 changed files with 12 additions and 13 deletions
|
@ -53,8 +53,8 @@ isPreferredContent mu notpresent file = do
|
|||
case M.lookup u m of
|
||||
Nothing -> return True
|
||||
Just matcher ->
|
||||
Utility.Matcher.matchM2 matcher notpresent $
|
||||
getTopFilePath file
|
||||
Utility.Matcher.matchMrun matcher $ \a ->
|
||||
a notpresent (getTopFilePath file)
|
||||
|
||||
{- Read the preferredContentLog into a map. The map is cached for speed. -}
|
||||
preferredContentMap :: Annex Annex.PreferredContentMap
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue