net library port numbers

2000-05-08 Thread George Russell

Socket.accept function returns a PortNumber as its third argument.  (This
is not what the interface comment says, but the comment is wrong.)  However
I can't find any way of extracting the contents of the PortNumber to an
integer.




RE: net library port numbers

2000-05-08 Thread Simon Marlow

 Socket.accept function returns a PortNumber as its third 
 argument.  (This
 is not what the interface comment says, but the comment is 
 wrong.)  However
 I can't find any way of extracting the contents of the 
 PortNumber to an
 integer.

I've just added instances of Ord, Enum, Real and Integral for PortNumber (it
already had Num).  You can now use fromIntegral for conversions.

Cheers,
Simon