diff options
author | 2017-12-05 15:00:50 -0400 | |
---|---|---|
committer | 2017-12-05 15:00:50 -0400 | |
commit | 236c467da19f34edb08f124e37fd26eb62c43fcf (patch) | |
tree | f4e488f77fb954812e4d48f399fc2ecab072afea /Annex/Url.hs | |
parent | f013f71cb5d3f7eee3afb3eb8f01a33206d717c4 (diff) |
more lambda-case conversion
Diffstat (limited to 'Annex/Url.hs')
-rw-r--r-- | Annex/Url.hs | 8 |
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 |