aboutsummaryrefslogtreecommitdiff
path: root/Utility/Url.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-11-11 18:05:01 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-11-11 18:05:01 -0400
commit3a6456a7b786e1cb41605a1ad46004e4de6d27b7 (patch)
tree4bebe117c5ae5f97698b5abbdda24b191afa28e3 /Utility/Url.hs
parentba1615a18964ddd97006b1f0eb4e90842d0b3568 (diff)
use cabal macro to detect if old version of network is being used
Diffstat (limited to 'Utility/Url.hs')
-rw-r--r--Utility/Url.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Utility/Url.hs b/Utility/Url.hs
index 4e152159a..e47cb9dee 100644
--- a/Utility/Url.hs
+++ b/Utility/Url.hs
@@ -119,6 +119,11 @@ request url headers requesttype = go 5 url
Nothing -> return rsp
Just newURI -> go n newURI_abs
where
+#if defined VERSION_network
+#if ! MIN_VERSION_network(2,4,0)
+#define WITH_OLD_URI
+#endif
+#endif
#ifdef WITH_OLD_URI
newURI_abs = fromMaybe newURI (newURI `relativeTo` u)
#else