Commit 39c31b02 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺
Browse files

Make compatible with `network-2.4` API

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

parent 0a98e4ca
{-# 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
relativeTo rel uri
| Header HdrLocation location <- rspHeaders response ]
-> return $ buildId
_ -> error "Unrecognised response from server."
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