summaryrefslogtreecommitdiff
path: root/Annex/Url.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 /Annex/Url.hs
parentf013f71cb5d3f7eee3afb3eb8f01a33206d717c4 (diff)
more lambda-case conversion
Diffstat (limited to 'Annex/Url.hs')
-rw-r--r--Annex/Url.hs8
1 files changed, 3 insertions, 5 deletions
diff --git a/Annex/Url.hs b/Annex/Url.hs
index b787ee78c..f12408a08 100644
--- a/Annex/Url.hs
+++ b/Annex/Url.hs
@@ -31,11 +31,9 @@ getUrlOptions = mkUrlOptions
<*> headers
<*> options
where
- headers = do
- v <- annexHttpHeadersCommand <$> Annex.getGitConfig
- case v of
- Just cmd -> lines <$> liftIO (readProcess "sh" ["-c", cmd])
- Nothing -> annexHttpHeaders <$> Annex.getGitConfig
+ headers = annexHttpHeadersCommand <$> Annex.getGitConfig >>= \case
+ Just cmd -> lines <$> liftIO (readProcess "sh" ["-c", cmd])
+ Nothing -> annexHttpHeaders <$> Annex.getGitConfig
options = map Param . annexWebOptions <$> Annex.getGitConfig
withUrlOptions :: (U.UrlOptions -> IO a) -> Annex a