summaryrefslogtreecommitdiff
path: root/Limit.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-10-31 23:39:55 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-10-31 23:39:55 -0400
commitc643136e32b99a650a6fdea0731ea5af275f6866 (patch)
tree0685c22f6bad89c40921d46d8ea081d86b3bb6bb /Limit.hs
parent3d2a9f84051e9dc705ba4bb4828af691e479ae0e (diff)
playing with >=>
Apparently in haskell if you teach a man to fish, he'll write more pointfree code.
Diffstat (limited to 'Limit.hs')
-rw-r--r--Limit.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Limit.hs b/Limit.hs
index 490577e80..3ae949bfb 100644
--- a/Limit.hs
+++ b/Limit.hs
@@ -67,7 +67,7 @@ addExclude glob = addLimit $ return . notExcluded
addIn :: String -> Annex ()
addIn name = addLimit $ check $ if name == "." then inAnnex else inremote
where
- check a f = Backend.lookupFile f >>= handle a
+ check a = Backend.lookupFile >=> handle a
handle _ Nothing = return False
handle a (Just (key, _)) = a key
inremote key = do
@@ -83,7 +83,7 @@ addCopies num =
Nothing -> error "bad number for --copies"
Just n -> addLimit $ check n
where
- check n f = Backend.lookupFile f >>= handle n
+ check n = Backend.lookupFile >=> handle n
handle _ Nothing = return False
handle n (Just (key, _)) = do
us <- keyLocations key