
3 Jun
2010
3 Jun
'10
1:58 p.m.
Am 03.06.2010 08:05 schrieb Ketil Malde:
Antoine Latter
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 module?
- 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?
-k
Hi, since this is really not obvious, I'd second to hide the constructor or at least a note should be added to the docs how to use PortNumber correctly. Regards, Matthias