[Haskell-cafe] ANN: network

Kazu Yamamoto (=?iso-2022-jp?B?GyRCOzNLXE9CSScbKEI=?=) kazu at iij.ad.jp
Wed Sep 5 02:40:50 UTC 2018

Hi Viktor,

> Small correction, the port number of course was and remains Word16
> not Word32.

Right. This is my fault. I have fixed this typo in github.

> One might also note that to the extent that applications did use the
> PortNumber in SockAddrInet, and SockAddrInet6 structures, they likely
> relied on the Num, Enum and Integral instances, rather than using
> "PortNum" directly.
> Those instances made it possible to use numeric literals or "fromIntegral"
> to create "PortNumber" from port numbers.  And this has not changed.  The
> only thing that's no longer possible is direct use of the "PortNum" constructor
> with values already in network byte order.  This should be a rare impediment,
> and the removal of the constructor means that all problems are detected at
> compile-time.
> So this is unlikely to be an issue for the majority of applications, which
> likely just use getaddrinfo() in any case, and don't build SockAddrInet*
> structures "by hand".

Thank you for your explanation!
This is exactly what we the maintainers intend.


More information about the Haskell-Cafe mailing list