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

Ketil Malde ketil at malde.org
Thu Jun 3 02:05:52 EDT 2010

Antoine Latter <aslatter at gmail.com> writes:

>>   *Main> PortNum 8888
>>   47138

> The PortNum constructor should rarely be used directly

So, shouldn't the constructor be hidden, and exported from an .Internal

> - it contains the port number in network-order. You should try:

Or perhaps even better, the type could be:

    data PortNum = PortNum { msb, lsb :: Word8 }

so that we avoid this kind of confusion?

If I haven't seen further, it is by standing in the footprints of giants

More information about the Haskell-Cafe mailing list