Pieter Laeremans | 27 Dec 00:22 2012

Type error when trying to adapt http-proxy to new conduit

Hi,


The http-proxy package isn't  compatible any longer with the latest conduit. Since it is open source, I thought, I might as well try to adapt it and submit a patch.

However I run into some difficulties.

For example I get this type error when I'm trying to compile it :

Network/HTTP/Proxy.hs:254:15:
    Couldn't match expected type `ResourceT
                                    IO (CIN.Pipe () () ByteString () (ResourceT IO) ())'
                with actual type `IO
                                    (CIN.Pipe () () ByteString () (ResourceT IO) ())'

I can't figure it out. To me it reads like : Expected x, actual x.  

Anyone has a clue? 

thanks,

Pieter
 

--
Pieter Laeremans <pieter <at> laeremans.org>

"The future is here. It's just not evenly distributed yet."  W. Gibson
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Brandon Allbery | 27 Dec 00:31 2012
Picon

Re: Type error when trying to adapt http-proxy to new conduit

On Wed, Dec 26, 2012 at 6:22 PM, Pieter Laeremans <pieter <at> laeremans.org> wrote:
Network/HTTP/Proxy.hs:254:15:
    Couldn't match expected type `ResourceT
                                    IO (CIN.Pipe () () ByteString () (ResourceT IO) ())'
                with actual type `IO
                                    (CIN.Pipe () () ByteString () (ResourceT IO) ())'

I can't figure it out. To me it reads like : Expected x, actual x.  

There's an extra ResourceT in the former.

expected `ResourceT IO (CIN.Pipe () () ByteString () (ResourceT IO) ())'
actual `IO (CIN.Pipe () () ByteString () (ResourceT IO) ())'

Might just need an extra lift?

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b <at> gmail.com                                  ballbery <at> sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Erik de Castro Lopo | 27 Dec 08:42 2012

Re: Type error when trying to adapt http-proxy to new conduit

Pieter Laeremans wrote:

> Hi,
> 
> The http-proxy package isn't  compatible any longer with the latest
> conduit. Since it is open source, I thought, I might as well try to adapt
> it and submit a patch.

Have you looked int git?

It currently compiles from git but there is a space leak that
I haven't managed to fix yet.

Erik
--

-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
Michael Snoyman | 27 Dec 09:27 2012

Re: Type error when trying to adapt http-proxy to new conduit




On Thu, Dec 27, 2012 at 9:42 AM, Erik de Castro Lopo <mle+hs <at> mega-nerd.com> wrote:
Pieter Laeremans wrote:

> Hi,
>
> The http-proxy package isn't  compatible any longer with the latest
> conduit. Since it is open source, I thought, I might as well try to adapt
> it and submit a patch.

Have you looked int git?

It currently compiles from git but there is a space leak that
I haven't managed to fix yet.

Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Hi Erik,

I remember discussing very briefly with you why it wasn't possible to simply use warp as a library for this project. I wonder if there would be a way to expose more functionality from warp to make the maintenance burden easier for http-proxy going forward. I'll be on IRC in a bit if you'd like to discuss it.

Michael
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Gmane