Commit 697950ff authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Merge pull request #2053 from RyanGlScott/master

Accommodate network/network-uri split
parents d643fde4 f7521c1e
......@@ -51,10 +51,14 @@ postBuildReport uri buildReport = do
}
case rspCode response of
(3,0,3) | [Just buildId] <- [ do rel <- parseRelativeReference location
#if defined(VERSION_network_uri)
return $ relativeTo rel uri
#elif defined(VERSION_network)
#if MIN_VERSION_network(2,4,0)
return $ relativeTo rel uri
#else
relativeTo rel uri
#endif
#endif
| Header HdrLocation location <- rspHeaders response ]
-> return $ buildId
......
......@@ -38,6 +38,10 @@ Flag old-directory
description: Use directory < 1.2 and old-time
default: False
Flag network-uri
description: Get Network.URI from the network-uri package
default: True
executable cabal
main-is: Main.hs
ghc-options: -Wall -fwarn-tabs
......@@ -130,7 +134,6 @@ executable cabal
filepath >= 1.0 && < 1.4,
HTTP >= 4000.2.5 && < 4000.3,
mtl >= 2.0 && < 3,
network >= 2.0 && < 2.6,
pretty >= 1 && < 1.2,
random >= 1 && < 1.1,
stm >= 2.0 && < 3,
......@@ -144,6 +147,11 @@ executable cabal
build-depends: directory >= 1.2 && < 1.3,
process >= 1.1.0.2 && < 1.3
if flag(network-uri)
build-depends: network-uri >= 2.6
else
build-depends: network >= 2.0 && < 2.6
if os(windows)
build-depends: Win32 >= 2 && < 3
cpp-options: -DWIN32
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment