Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #30 from hvr/network24

Use `MIN_VERSION_network()` instead of CABAL-flag
  • Loading branch information...
commit b7f0c98e01f441becec13f8a216f4e2e4f82fcba 2 parents a9792ef + 21f69c1
Ganesh Sittampalam hsenag authored
Showing with 10 additions and 13 deletions.
  1. +4 −7 HTTP.cabal
  2. +3 −3 Network/Browser.hs
  3. +3 −3 Network/HTTP/Auth.hs
11 HTTP.cabal
View
@@ -85,22 +85,18 @@ Library
Network.HTTP.Utils
Paths_HTTP
GHC-options: -fwarn-missing-signatures -Wall
- Build-depends: base >= 2 && < 4.7, parsec
+ Build-depends: base >= 2 && < 4.7, network < 2.5, parsec
Extensions: FlexibleInstances
if flag(old-base)
Build-depends: base < 3
else
Build-depends: base >= 3, array, old-time, bytestring
+
if flag(mtl1)
Build-depends: mtl >= 1.1 && < 1.2
CPP-Options: -DMTL1
else
Build-depends: mtl >= 2.0 && < 2.2
- if flag(network23)
- Build-depends: network < 2.4
- CPP-Options: -DNETWORK23
- else
- Build-depends: network >= 2.4 && < 2.5
if flag(warn-as-error)
ghc-options: -Werror
@@ -116,6 +112,7 @@ Test-Suite test
hs-source-dirs: test
main-is: httpTests.hs
+ -- note: version constraints are inherited from HTTP library stanza
build-depends: HTTP,
HUnit,
httpd-shed,
@@ -129,7 +126,7 @@ Test-Suite test
warp >= 1.2 && < 1.3,
pureMD5 >= 2.1 && < 2.2,
base >= 2 && < 4.6,
- network < 2.5,
+ network,
split >= 0.1 && < 0.2,
test-framework,
test-framework-hunit
6 Network/Browser.hs
View
@@ -1035,10 +1035,10 @@ supportedScheme u = uriScheme u == "http:"
-- If the second argument is not sufficient context for determining
-- a full URI then anarchy reins.
uriDefaultTo :: URI -> URI -> URI
-#ifdef NETWORK23
-uriDefaultTo a b = maybe a id (a `relativeTo` b)
-#else
+#if MIN_VERSION_network(2,4,0)
uriDefaultTo a b = a `relativeTo` b
+#else
+uriDefaultTo a b = maybe a id (a `relativeTo` b)
#endif
6 Network/HTTP/Auth.hs
View
@@ -190,10 +190,10 @@ headerToChallenge baseURI (Header _ str) =
}
annotateURIs :: [Maybe URI] -> [URI]
-#ifdef NETWORK23
- annotateURIs = (map (\u -> fromMaybe u (u `relativeTo` baseURI))) . catMaybes
-#else
+#if MIN_VERSION_network(2,4,0)
annotateURIs = map (`relativeTo` baseURI) . catMaybes
+#else
+ annotateURIs = (map (\u -> fromMaybe u (u `relativeTo` baseURI))) . catMaybes
#endif
-- Change These:
Please sign in to comment.
Something went wrong with that request. Please try again.