[Haskell-cafe] Re: Sockets get bound to wrong port on Windows

Bardur Arantsson spam at scientician.net
Thu Jun 3 01:34:51 EDT 2010


On 2010-06-03 05:10, Matthias Reisner wrote:
> Hi,
>
> there's something wrong with port numbers in the Network.Socket module
> of package network. Printing values gives:
>
> *Main> PortNum 8888
> 47138
> *Main> PortNum 47138
> 8888
>

Try

    (fromIntegral 8888) :: PortNumber

(Yes, it's weird.)

Cheers,

Bardur



More information about the Haskell-Cafe mailing list