Re: Socket library ghc 5.02.1

2001-11-22 Thread Volker Stolz
In local.glasgow-haskell-users, you wrote: >> main = >> do >> d <- connectTo "localhost" (PortNumber 80) >> hPutStr d "GET / HTTP/1.0\n\n" >> hFlush d >> c <- hGetContents d >> putStr c > > whereas on Linux I get the following error: > *** Exception: failed > Action: connec

Re: Socket library ghc 5.02.1

2001-11-22 Thread Sven Eric Panitz
From: Volker Stolz <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED] In local.glasgow-haskell-users, you wrote: >> main = >> do >> d <- connectTo "localhost" (PortNumber 80) >> hPutStr d "GET / HTTP/1.0\n\n" >> hFlus

Re: Socket library ghc 5.02.1

2001-11-22 Thread Volker Stolz
In local.glasgow-haskell-users, you wrote: > It seems that the Socket library does still not work > with ghc 5.02.1. [ghci clarification] There, it crashes for me even on the 2nd invocation: connect(13, {sin_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("137.226.194.33")}}, 16) = -1 EI

RE: Socket library ghc 5.02.1

2001-11-22 Thread Simon Marlow
> In local.glasgow-haskell-users, you wrote: > > It seems that the Socket library does still not work > > with ghc 5.02.1. > > [ghci clarification] > There, it crashes for me even on the 2nd invocation: > > connect(13, {sin_family=AF_INET, sin_port=htons(80), > sin_addr=inet_addr("137.226.194.

Re: Socket library ghc 5.02.1

2001-11-22 Thread Volker Stolz
Am 22. Nov 2001 um 16:22 MET schrieb Simon Marlow: > I'm sad to say there was another bug in SocketPrim.getSocketOption in > 5.02.1. Please try the enclosed patch. How does this explain the two differing behaviours? And why didn't it happen in a compiled version? -- Volker Stolz * [EMAIL PROTEC

RE: Socket library ghc 5.02.1

2001-11-22 Thread Simon Marlow
> Am 22. Nov 2001 um 16:22 MET schrieb Simon Marlow: > > I'm sad to say there was another bug in > SocketPrim.getSocketOption in > > 5.02.1. Please try the enclosed patch. > > How does this explain the two differing behaviours? > And why didn't it happen in a compiled version? Because the 'op

Re: Socket library ghc 5.02.1

2001-11-26 Thread Sigbjorn Finne
"Sven Eric Panitz" <[EMAIL PROTECTED]> writes: > > It seems that the Socket library does still not work > with ghc 5.02.1. > I tried the simple test: > > > main = > > do > > d <- connectTo "localhost" (PortNumber 80) > > hPutStr d "GET / HTTP/1.0\n\n" > > hFlush d > > c <-

Re: Socket library ghc 5.02.1

2001-11-27 Thread Sven Eric Panitz
From: "Sigbjorn Finne" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]> Date: Mon, 26 Nov 2001 12:30:47 -0800 "Sven Eric Panitz" <[EMAIL PROTECTED]> writes: > > It seems that the Socket library doe

Re: Socket library ghc 5.02.1

2001-11-27 Thread Sigbjorn Finne
"Sven Eric Panitz" <[EMAIL PROTECTED]> writes: > ... > > I tried the following little test, which stays away from > above functions: > > > module Main where > > > > import BSD > > import SocketPrim > > import Socket (withSocketsDo) > > > > main = > > Socket.withSocketsDo > > (do > >

Re: Socket library ghc 5.02.1

2001-11-27 Thread Sigbjorn Finne
> > Conclusion: you're hosed with ghc-5.02.1 and its socket libs under > Win32. Sorry. > If you don't mind getting your hands a (little) bit dirty, here's a story that will work ghc-5.02.1: * edit SocketPrim.hi (and SocketPrim.p_hi), to instead of saying "Socket" in its __export section i

Re: Socket library ghc 5.02.1

2001-11-28 Thread Sven Eric Panitz
From: "Sigbjorn Finne" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Date: Tue, 27 Nov 2001 09:30:04 -0800 > > Conclusion: you're hosed with ghc-5.02.1 and its socket libs under > Win32. Sorry. > If you don't mind getting