summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-01-28 16:11:28 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-01-28 16:11:28 -0400
commit82161654830b0dc4187e9928555c9321ef61bb89 (patch)
treefef3edba1366663956ed484a9c9951616765d505 /Annex
parent7ca8ec00a7fcda71a08d22f06838424765a1b215 (diff)
import Data.Default in Common
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Content.hs4
-rw-r--r--Annex/FileMatcher.hs6
-rw-r--r--Annex/Wanted.hs8
3 files changed, 9 insertions, 9 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs
index a78cf674c..f91c1e72a 100644
--- a/Annex/Content.hs
+++ b/Annex/Content.hs
@@ -110,10 +110,10 @@ inAnnexSafe key = inAnnex' (fromMaybe False) (Just False) go key
( checkOr is_unlocked lockfile
, return is_missing
)
- checkOr def lockfile = do
+ checkOr d lockfile = do
v <- checkLocked lockfile
return $ case v of
- Nothing -> def
+ Nothing -> d
Just True -> is_locked
Just False -> is_unlocked
#else
diff --git a/Annex/FileMatcher.hs b/Annex/FileMatcher.hs
index c6a729a9c..16ade922c 100644
--- a/Annex/FileMatcher.hs
+++ b/Annex/FileMatcher.hs
@@ -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
diff --git a/Annex/Wanted.hs b/Annex/Wanted.hs
index 87b4377c2..ba7df0a9c 100644
--- a/Annex/Wanted.hs
+++ b/Annex/Wanted.hs
@@ -15,15 +15,15 @@ import qualified Data.Set as S
{- Check if a file is preferred content for the local repository. -}
wantGet :: Bool -> Maybe Key -> AssociatedFile -> Annex Bool
-wantGet def key file = isPreferredContent Nothing S.empty key file def
+wantGet d key file = isPreferredContent Nothing S.empty key file d
{- Check if a file is preferred content for a remote. -}
wantSend :: Bool -> Maybe Key -> AssociatedFile -> UUID -> Annex Bool
-wantSend def key file to = isPreferredContent (Just to) S.empty key file def
+wantSend d key file to = isPreferredContent (Just to) S.empty key file d
{- Check if a file can be dropped, maybe from a remote.
- Don't drop files that are preferred content. -}
wantDrop :: Bool -> Maybe UUID -> Maybe Key -> AssociatedFile -> Annex Bool
-wantDrop def from key file = do
+wantDrop d from key file = do
u <- maybe getUUID (return . id) from
- not <$> isPreferredContent (Just u) (S.singleton u) key file def
+ not <$> isPreferredContent (Just u) (S.singleton u) key file d