[GHC5] Creating Socket.PortNumber from Int?
Thu, 7 Jun 2001 10:07:48 +0100
> Wed, 6 Jun 2001 10:17:34 +0100, Simon Marlow=20
> <email@example.com> pisze:
> > Think of it this way: mkPortNumber has been renamed to=20
> fromIntegral, and
> > now supports making port numbers from any integral type,=20
> not just Int.
> BTW, why PortNumber is not just Int?
It's kept in network byte order. We could make it an Int and do the
translation to/from network byte order whenever we need to pass one
outside Haskell - I didn't investigate doing it this way, it may or may
not be simpler.