summaryrefslogtreecommitdiff
path: root/Backend
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 /Backend
parentf013f71cb5d3f7eee3afb3eb8f01a33206d717c4 (diff)
more lambda-case conversion
Diffstat (limited to 'Backend')
-rw-r--r--Backend/Hash.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Backend/Hash.hs b/Backend/Hash.hs
index a5abc8447..a0a16b74d 100644
--- a/Backend/Hash.hs
+++ b/Backend/Hash.hs
@@ -176,9 +176,8 @@ hashFile hash file filesize = go hash
usehasher hashsize@(HashSize sz) = case shaHasher hashsize filesize of
Left sha -> use sha
- Right (external, internal) -> do
- v <- liftIO $ externalSHA external sz file
- case v of
+ Right (external, internal) ->
+ liftIO (externalSHA external sz file) >>= \case
Right r -> return r
Left e -> do
warning e