0
votes

I'm trying to install http-conduit-1.9.6 (my Haskell application needs that version), and my "cabal install http-conduit-1.9.6" gives me the following error:

Building http-conduit-1.9.6...
Preprocessing library http-conduit-1.9.6...
[ 1 of 12] Compiling Network.HTTP.Conduit.Util ( Network/HTTP/Conduit/Util.hs, dist/build/Network/HTTP/Conduit/Util.o )
[ 2 of 12] Compiling Network.HTTP.Conduit.ConnInfo ( Network/HTTP/Conduit/ConnInfo.hs, dist/build/Network/HTTP/Conduit/ConnInfo.o )
[ 3 of 12] Compiling Network.HTTP.Conduit.Types ( Network/HTTP/Conduit/Types.hs, dist/build/Network/HTTP/Conduit/Types.o )

Network/HTTP/Conduit/Types.hs:239:13:

No instance for (Read UTCTime)  
  arising from the 'deriving' clause of a data type declaration  
Possible fix:
  add an instance declaration for (Read UTCTime)
  or use a standalone 'deriving instance' declaration,
       so you can specify the instance context yourself
When deriving the instance for (Read Cookie)

Failed to install http-conduit-1.9.6
cabal: Error: some packages failed to install:
http-conduit-1.9.6 failed during the building phase. The exception was:
ExitFailure 1

My work platform is Ubuntu 14.04 and cabal 1.20 Thanks.

1
What version of `time' do you have? Have you tried installing in a sandbox?user2407038
Using a sandbox I am able to successfully build and install http-conduit-1.9.6, but I get the same error message when I run cabal repl. I'm using HP 2014.2.0.0 - ghc 7.8.3 - cabal 1.20.0.3ErikR
You probably need to import Data.Time.Format.Parse.arrowd
I'm using a sandbox, but when I try to install into the sandbox, It says me that the requested package is already installed: time-1.4.0.1. But I don't have any time package into the sandbox, I have time-1.4.0.1 in /var/lib/ghc/package.conf.d and time-1.5 in /root/.ghc/x86_64-linux-7.6.3/package.conf.d. Looking at the http-conduit-1.9.6 especifications, there is no limitation with versionsOscar

1 Answers

2
votes

To build http-conduit-1.9.6 (in a sandbox), I've had to:

  1. Explicitly add a dependency on network-uri in the build-depends of the http-conduit.cabal

  2. In Network/HTTP/Conduit/Types.hs, replace the import Data.Time.Clock by import Data.Time

    (this issue in the time package put me on the right track: https://github.com/haskell/time/issues/7)

Let me know if that doesn't do it.