[Haskell-cafe] Re: Trying to write a TCP proxy

John Ky newhoggy at gmail.com
Wed Sep 20 10:26:03 EDT 2006


Hi again,

Given that putStrLn contents did manage to print out the HTTP header
before blocking, am I correct in coming to the conlusion that
'contents' is evaluated lazily?  So Monads don't actually eliminate
laziness?

-John

On 9/20/06, Philippa Cowderoy <flippa at flippac.org> wrote:
> On Wed, 20 Sep 2006, John Ky wrote:
>
> > Actually, it blocks on:
> >
> > >    putStrLn contents
> >
> > It even blocks if I replace it with:
> >
> > >    print $ length contents
> >
> > Is there some kind of magic happening here?
> >
>
> No, but you're trying to do magic - it can't get all of contents until the
> connection's dropped.
>
> --
> flippa at flippac.org
>
> A problem that's all in your head is still a problem.
> Brain damage is but one form of mind damage.
>


More information about the Haskell-Cafe mailing list