Skip to content
Browse files

Merge pull request #1044 from hvr/network24

Make compatible with `network-2.4` API
  • Loading branch information...
2 parents 0a98e4c + 39c31b0 commit e9c9b7a321a67a231a32312a5fe91d3a36f450ee @tibbe tibbe committed Sep 19, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 cabal-install/Distribution/Client/BuildReports/Upload.hs
View
6 cabal-install/Distribution/Client/BuildReports/Upload.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE PatternGuards #-}
+{-# LANGUAGE CPP, PatternGuards #-}
-- This is a quick hack for uploading build reports to Hackage.
module Distribution.Client.BuildReports.Upload
@@ -51,7 +51,11 @@ postBuildReport uri buildReport = do
}
case rspCode response of
(3,0,3) | [Just buildId] <- [ do rel <- parseRelativeReference location
+#if MIN_VERSION_network(2,4,0)
+ return $ relativeTo rel uri
+#else
relativeTo rel uri
+#endif
| Header HdrLocation location <- rspHeaders response ]
-> return $ buildId
_ -> error "Unrecognised response from server."

0 comments on commit e9c9b7a

Please sign in to comment.
Something went wrong with that request. Please try again.