diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-12-05 15:00:50 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-12-05 15:00:50 -0400 |
commit | 236c467da19f34edb08f124e37fd26eb62c43fcf (patch) | |
tree | f4e488f77fb954812e4d48f399fc2ecab072afea /Annex/Link.hs | |
parent | f013f71cb5d3f7eee3afb3eb8f01a33206d717c4 (diff) |
more lambda-case conversion
Diffstat (limited to 'Annex/Link.hs')
-rw-r--r-- | Annex/Link.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Annex/Link.hs b/Annex/Link.hs index fcc300bee..e083cfe8c 100644 --- a/Annex/Link.hs +++ b/Annex/Link.hs @@ -55,11 +55,10 @@ getAnnexLinkTarget' file coresymlinks = if coresymlinks check probefilecontent $ return Nothing where - check getlinktarget fallback = do - v <- liftIO $ catchMaybeIO $ getlinktarget file - case v of + check getlinktarget fallback = + liftIO (catchMaybeIO $ getlinktarget file) >>= \case Just l - | isLinkToAnnex (fromInternalGitPath l) -> return v + | isLinkToAnnex (fromInternalGitPath l) -> return (Just l) | otherwise -> return Nothing Nothing -> fallback |