<p>Hi Arnaud,</p>
<p>One thing you might want to try is to stop using the PortNumber data constructor, and instead rely on &#39;fromInteger&#39; to do the right thing.</p>
<p>The data constructor assumes that it&#39;s argument is in network byte order, which won&#39;t always be the case.</p>
<p>It&#39;s not obvious that the constructor should be avoided - this is the second time today I&#39;ve seen this!</p>
<p>Take care,<br>
Antoine</p>
<p><blockquote type="cite">On Jun 3, 2010 5:13 PM, &quot;Arnaud Bailly&quot; &lt;<a href="mailto:arnaud.oqube@gmail.com">arnaud.oqube@gmail.com</a>&gt; wrote:<br><br>Hello,<br>
I have the following code which works ok on Linux and Windows XP, but<br>
fails on Mac OS X with error message:<br>
<br>
Connect: does not exist (connection refused)<br>
<br>
The server:<br>
<br>
    doStartstate = do pr &lt;- liftIO $ runProcess  ...<br>
                                    liftIO $ threadDelay 500000<br>
                                   st &lt;- get<br>
                                   put st { slimHandle = Just pr }<br>
<br>
<br>
The client:<br>
<br>
    fetchAnswers st msgs = liftIO $! do let port = PortNumber $<br>
fromInteger $ port $ config st<br>
                                        cnx &lt;- connectTo &quot;localhost&quot; port<br>
<br>
Help most welcome, thanks<br>
<br>
Arnaud<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></p>