[GHC5] Creating Socket.PortNumber from Int?

Volker Stolz vs@foldr.org
Wed, 6 Jun 2001 11:47:03 +0200

In local.glasgow-haskell-users, you wrote:
>Think of it this way: mkPortNumber has been renamed to fromIntegral, and
>now supports making port numbers from any integral type, not just Int.
>I didin't see the need for a special purpose convesion from Int, when
>fromIntegral does the job in a much more general way.  

Okay, here a nice way to handle this:

#if __GLASGOW_HASKELL__ >= 501
 mkPortNumber = fromIntegral
Abstrakte Syntaxträume.
Volker Stolz * stolz@i2.informatik.rwth-aachen.de * PGP + S/MIME