aboutsummaryrefslogtreecommitdiff
path: root/CmdLine/Action.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 /CmdLine/Action.hs
parentf013f71cb5d3f7eee3afb3eb8f01a33206d717c4 (diff)
more lambda-case conversion
Diffstat (limited to 'CmdLine/Action.hs')
-rw-r--r--CmdLine/Action.hs12
1 files changed, 5 insertions, 7 deletions
diff --git a/CmdLine/Action.hs b/CmdLine/Action.hs
index b8d0e3a40..2e0bc2ba2 100644
--- a/CmdLine/Action.hs
+++ b/CmdLine/Action.hs
@@ -186,13 +186,11 @@ allowConcurrentOutput = id
onlyActionOn :: Key -> CommandStart -> CommandStart
onlyActionOn k a = onlyActionOn' k run
where
- run = do
- -- Run whole action, not just start stage, so other threads
- -- block until it's done.
- r <- callCommandAction' a
- case r of
- Nothing -> return Nothing
- Just r' -> return $ Just $ return $ Just $ return r'
+ -- Run whole action, not just start stage, so other threads
+ -- block until it's done.
+ run = callCommandAction' a >>= \case
+ Nothing -> return Nothing
+ Just r' -> return $ Just $ return $ Just $ return r'
onlyActionOn' :: Key -> Annex a -> Annex a
onlyActionOn' k a = go =<< Annex.getState Annex.concurrency