From 01068d828001a8cbf2974bbfde7438eaf7084f77 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 13 Sep 2017 15:35:42 -0400 Subject: [PATCH] fix build with old http-client --- Utility/Url.hs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Utility/Url.hs b/Utility/Url.hs index e6dcd33889..27913033bb 100644 --- a/Utility/Url.hs +++ b/Utility/Url.hs @@ -367,8 +367,16 @@ matchStatusCodeException want e@(StatusCodeException s _ _) matchStatusCodeException _ _ = Nothing #endif +#if MIN_VERSION_http_client(0,5,0) matchHttpExceptionContent :: (HttpExceptionContent -> Bool) -> HttpException -> Maybe HttpException matchHttpExceptionContent want e@(HttpExceptionRequest _ hec) | want hec = Just e | otherwise = Nothing matchHttpExceptionContent _ _ = Nothing +#else +matchHttpExceptionContent :: (HttpException -> Bool) -> HttpException -> Maybe HttpException +matchHttpExceptionContent want e + | want e = Just e + | otherwise = Nothing +matchHttpExceptionContent _ _ = Nothing +#endif