aboutsummaryrefslogtreecommitdiff
path: root/Command/CalcKey.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-12-05 15:00:50 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-12-05 15:00:50 -0400
commit236c467da19f34edb08f124e37fd26eb62c43fcf (patch)
treef4e488f77fb954812e4d48f399fc2ecab072afea /Command/CalcKey.hs
parentf013f71cb5d3f7eee3afb3eb8f01a33206d717c4 (diff)
more lambda-case conversion
Diffstat (limited to 'Command/CalcKey.hs')
-rw-r--r--Command/CalcKey.hs12
1 files changed, 5 insertions, 7 deletions
diff --git a/Command/CalcKey.hs b/Command/CalcKey.hs
index e018079cb..57e6f40c9 100644
--- a/Command/CalcKey.hs
+++ b/Command/CalcKey.hs
@@ -19,10 +19,8 @@ cmd = noCommit $ noMessages $ dontCheck repoExists $
(batchable run (pure ()))
run :: () -> String -> Annex Bool
-run _ file = do
- mkb <- genKey (KeySource file file Nothing) Nothing
- case mkb of
- Just (k, _) -> do
- liftIO $ putStrLn $ key2file k
- return True
- Nothing -> return False
+run _ file = genKey (KeySource file file Nothing) Nothing >>= \case
+ Just (k, _) -> do
+ liftIO $ putStrLn $ key2file k
+ return True
+ Nothing -> return False