diff options
author | Joey Hess <joey@kitenet.net> | 2012-10-13 15:17:15 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-10-13 15:17:15 -0400 |
commit | 2c1c19b85a363089e1bb8276a4300effcf004a2d (patch) | |
tree | 502d9bb5abd1840a672469f17d0d96dc8452400a /Logs | |
parent | 49bee9969e30ee05848cff8354671420425b6fb5 (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')
-rw-r--r-- | Logs/PreferredContent.hs | 4 |
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 |