diff options
author | Joey Hess <joey@kitenet.net> | 2011-10-31 23:39:55 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-10-31 23:39:55 -0400 |
commit | c643136e32b99a650a6fdea0731ea5af275f6866 (patch) | |
tree | 0685c22f6bad89c40921d46d8ea081d86b3bb6bb /Limit.hs | |
parent | 3d2a9f84051e9dc705ba4bb4828af691e479ae0e (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.hs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |