
On 11/7/05, Ashley Yakeley
This brings the question on whether they would be native or big endian -
This should be unambiguous. For instance, in the address 127.0.0.1, 127 is the high Word8 of the Word32.
I vote for this. Having Haskell values in Network order is awkward, especially if you can't treat them as opaque. For example, my DNS library would be pure Haskell, if I didn't have to import htonl and friends. The extra htonl's on network operations shouldn't cost too much, and we have type-system to ensure that the conversion is done consistently.
Does it make sense to have the address type in there? Most of the time high level applications should not care whether the socket is IPv4 or IPv6 (or something entirely else).
Sometimes applications exchange host addresses between themselves, consider a distributed system like DNS or a peer-to-peer network. Best regards Tomasz