aboutsummaryrefslogtreecommitdiff
path: root/Logs/PreferredContent.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-13 15:17:15 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-13 15:17:15 -0400
commit2c1c19b85a363089e1bb8276a4300effcf004a2d (patch)
tree502d9bb5abd1840a672469f17d0d96dc8452400a /Logs/PreferredContent.hs
parent49bee9969e30ee05848cff8354671420425b6fb5 (diff)
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
Diffstat (limited to 'Logs/PreferredContent.hs')
-rw-r--r--Logs/PreferredContent.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Logs/PreferredContent.hs b/Logs/PreferredContent.hs
index 9bb915983..049d6b86b 100644
--- a/Logs/PreferredContent.hs
+++ b/Logs/PreferredContent.hs
@@ -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