diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-09-13 15:35:42 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-09-13 15:35:42 -0400 |
commit | 00db359b27be79857418a9f1c2e7ef850afbda71 (patch) | |
tree | a1f4243c222be3d1af12af07eb61bffd62c23c5f | |
parent | 7cad5617eec4328888929dca553cd7f131d4441a (diff) |
fix build with old http-client
-rw-r--r-- | Utility/Url.hs | 8 |
1 files changed, 8 insertions, 0 deletions
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 |