summaryrefslogtreecommitdiff
path: root/Command/Whereis.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-05-15 02:02:46 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-05-15 02:02:46 -0400
commit56bc3e95cabb85e5f23e30b453f90438c33efbb8 (patch)
treec13ac69cfc2b5ba9582aa5c1ebd427bc0d337b16 /Command/Whereis.hs
parentb400984ddf9aeb24c3d67e87cfeb29470618636c (diff)
refactor some boilerplate
Diffstat (limited to 'Command/Whereis.hs')
-rw-r--r--Command/Whereis.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Command/Whereis.hs b/Command/Whereis.hs
index 599df4467..2e0fa15f6 100644
--- a/Command/Whereis.hs
+++ b/Command/Whereis.hs
@@ -26,7 +26,7 @@ seek = [withFilesInGit start]
start :: CommandStartString
start file = isAnnexed file $ \(key, _) -> do
showStart "whereis" file
- return $ Just $ perform key
+ next $ perform key
perform :: Key -> CommandPerform
perform key = do
@@ -35,12 +35,12 @@ perform key = do
let num = length uuids
showNote $ show num ++ " " ++ copiesplural num
if null $ uuids
- then return Nothing
+ then stop
else do
pp <- prettyPrintUUIDs uuids
showLongNote $ pp
showProgress
- return $ Just $ return True
+ next $ return True
where
copiesplural 1 = "copy"
copiesplural _ = "copies"