Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make compatible with `network-2.4` API

The specific API change in `relativeTo` this changeset
compensates for has been introduced in

 haskell/network@4a3fdef
  • Loading branch information...
commit 39c31b02aa13cff2235f43adcae628f755e7a780 1 parent 0a98e4c
@hvr hvr authored
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."
Please sign in to comment.
Something went wrong with that request. Please try again.