From ccb004ba10cfcdbcc419440e5f877605896bac4c Mon Sep 17 00:00:00 2001 From: Chris Wong Date: Fri, 14 Oct 2016 22:42:03 +1300 Subject: Update to http-conduit 2.2 The new `parseRequest` function doesn't throw on non-200 responses, so we don't need to account for these in the exception handler. --- src/Hakyll/Check.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Hakyll/Check.hs b/src/Hakyll/Check.hs index c917f3a..b41b40e 100644 --- a/src/Hakyll/Check.hs +++ b/src/Hakyll/Check.hs @@ -204,7 +204,7 @@ checkExternalUrl url = do result <- liftIO $ try $ do mgr <- Http.newManager Http.tlsManagerSettings runResourceT $ do - request <- Http.parseUrl urlToCheck + request <- Http.parseRequest urlToCheck response <- Http.http (settings request) mgr let code = Http.statusCode (Http.responseStatus response) return $ code >= 200 && code < 300 @@ -236,8 +236,7 @@ checkExternalUrl url = do -- Convert exception to a concise form showException e = case cast e of - Just (Http.StatusCodeException (Http.Status code msg) _ _) -> - show code ++ " " ++ unpack msg + Just (Http.HttpExceptionRequest _ e') -> show e' _ -> head $ words $ show e #else checkExternalUrl _ = return () -- cgit v1.2.3 From 218d68363adc426b91dcbcdfb44f9f3da85f2e7a Mon Sep 17 00:00:00 2001 From: Chris Wong Date: Fri, 14 Oct 2016 22:44:24 +1300 Subject: Update to optparse-applicative 0.13 --- hakyll.cabal | 2 +- src/Hakyll/Main.hs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/hakyll.cabal b/hakyll.cabal index c66524e..06cff67 100644 --- a/hakyll.cabal +++ b/hakyll.cabal @@ -175,7 +175,7 @@ Library unordered-containers >= 0.2 && < 0.3, vector >= 0.11 && < 0.12, yaml >= 0.8 && < 0.9, - optparse-applicative >= 0.12 && < 0.13 + optparse-applicative >= 0.13 && < 0.14 If flag(previewServer) Build-depends: diff --git a/src/Hakyll/Main.hs b/src/Hakyll/Main.hs index c46c705..b48743b 100644 --- a/src/Hakyll/Main.hs +++ b/src/Hakyll/Main.hs @@ -16,7 +16,8 @@ import System.Exit (ExitCode(ExitSuccess), exitWit -------------------------------------------------------------------------------- -import Options.Applicative +import Data.Monoid ((<>)) +import Options.Applicative -------------------------------------------------------------------------------- -- cgit v1.2.3