From 4a1ef0b51d234a876d0621c710413ebebff69239 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Thu, 13 Oct 2016 12:32:10 +0200
Subject: [PATCH] Revert "Remove http-client CPP conditionals."

This reverts commit 3f82471355286d33f2d73329c29a51c47bf76ad7.

We might want to revert the requirement of http-client 0.5,
as this is not yet in Stackage and that is starting to
cause problems.  I can't recall why it is there.
---
 src/Text/Pandoc/Shared.hs | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs
index 7e9d0f62b..48bcc9a51 100644
--- a/src/Text/Pandoc/Shared.hs
+++ b/src/Text/Pandoc/Shared.hs
@@ -153,7 +153,16 @@ import Paths_pandoc (getDataFileName)
 #ifdef HTTP_CLIENT
 import Network.HTTP.Client (httpLbs, responseBody, responseHeaders,
                             Request(port,host))
-import Network.HTTP.Client (parseRequest, newManager)
+#if MIN_VERSION_http_client(0,4,30)
+import Network.HTTP.Client (parseRequest)
+#else
+import Network.HTTP.Client (parseUrl)
+#endif
+#if MIN_VERSION_http_client(0,4,18)
+import Network.HTTP.Client (newManager)
+#else
+import Network.HTTP.Client (withManager)
+#endif
 import Network.HTTP.Client.Internal (addProxy)
 import Network.HTTP.Client.TLS (tlsManagerSettings)
 import System.Environment (getEnv)