Re: [Haskell-cafe] Wai and http-enumerator not as lazy as I'd like

2011-05-01 Thread Erik de Castro Lopo
Michael Snoyman wrote: > On Fri, Apr 29, 2011 at 2:49 AM, Erik de Castro Lopo > > > Has anyone done anything like this and care to shed some light? > > It's a little bit complicated, but hopefully this should help out: Thats Michael. I've tried it and it works. Now to study it and figure out how

Re: [Haskell-cafe] Wai and http-enumerator not as lazy as I'd like

2011-04-29 Thread Michael Snoyman
On Fri, Apr 29, 2011 at 2:49 AM, Erik de Castro Lopo wrote: > Antoine Latter wrote: > >> None of the "lbs" functions in http-enumerator can operate in constant >> space - they are all built on top of the utility function "lbsIter" >> which provides a warning: >> >> > Convert the HTTP response into

Re: [Haskell-cafe] Wai and http-enumerator not as lazy as I'd like

2011-04-28 Thread Erik de Castro Lopo
Antoine Latter wrote: > None of the "lbs" functions in http-enumerator can operate in constant > space - they are all built on top of the utility function "lbsIter" > which provides a warning: > > > Convert the HTTP response into a Response value. > > > > Even though a Response contains a lazy by

Re: [Haskell-cafe] Wai and http-enumerator not as lazy as I'd like

2011-04-26 Thread Antoine Latter
On Tue, Apr 26, 2011 at 7:27 AM, Erik de Castro Lopo wrote: > Hi all, > > I'm using Wai and http-enumerator to build a http proxy. The core of > the code looks like this: > >    import qualified Network.HTTP.Enumerator     as HE >    import qualified Network.Wai                 as Wai > >    serve

[Haskell-cafe] Wai and http-enumerator not as lazy as I'd like

2011-04-26 Thread Erik de Castro Lopo
Hi all, I'm using Wai and http-enumerator to build a http proxy. The core of the code looks like this: import qualified Network.HTTP.Enumerator as HE import qualified Network.Wai as Wai serveRequest :: forall (m :: * -> *). (MonadControlIO m, Failure