From 00db359b27be79857418a9f1c2e7ef850afbda71 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 13 Sep 2017 15:35:42 -0400 Subject: fix build with old http-client --- Utility/Url.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Utility') diff --git a/Utility/Url.hs b/Utility/Url.hs index e6dcd3388..27913033b 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 -- cgit v1.2.3