Fwd: [Haskell-cafe] Weird socket problem on Mac OS X

2010-06-04 Thread Arnaud Bailly
-- Forwarded message -- From: Arnaud Bailly arnaud.oq...@gmail.com Date: Fri, Jun 4, 2010 at 11:59 AM Subject: Re: [Haskell-cafe] Weird socket problem on Mac OS X To: Antoine Latter aslat...@gmail.com Hello, I managed to solve the problem using Network.Socket instead of Network

Re: [Haskell-cafe] Weird socket problem on Mac OS X

2010-06-04 Thread Antoine Latter
On Fri, Jun 4, 2010 at 12:11 AM, Arnaud Bailly arnaud.oq...@gmail.com wrote: Yes, I have also seen the other post on the same topic, but it seemed to refer to the PortNumber in Network.Socket with a PortNum constructor I think, not the one in Network (but I am probably misleading myself as one

[Haskell-cafe] Weird socket problem on Mac OS X

2010-06-03 Thread Arnaud Bailly
Hello, I have the following code which works ok on Linux and Windows XP, but fails on Mac OS X with error message: Connect: does not exist (connection refused) The server: doStartstate = do pr - liftIO $ runProcess ... liftIO $ threadDelay 50

Re: [Haskell-cafe] Weird socket problem on Mac OS X

2010-06-03 Thread Antoine Latter
Hi Arnaud, One thing you might want to try is to stop using the PortNumber data constructor, and instead rely on 'fromInteger' to do the right thing. The data constructor assumes that it's argument is in network byte order, which won't always be the case. It's not obvious that the constructor