[GHC5] Creating Socket.PortNumber from Int?
Simon Marlow
simonmar@microsoft.com
Thu, 7 Jun 2001 10:07:48 +0100
> Wed, 6 Jun 2001 10:17:34 +0100, Simon Marlow=20
> <simonmar@microsoft.com> pisze:
>=20
> > 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.
>=20
> 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.
Cheers,
Simon