> Sorry,
>
> I've just worked it out.
>
> PortNumber is an instance of the class Enum
> so we can use
>
> toEnum :: Int -> a
It's also an instance of the Integral class, which means you can just
write integral constants of type PortNumber. eg. (80 :: PortNumber) is
valid. Also, the universal integral conversion function 'fromIntegral'
can be used for converting values of other integral types into
PortNumbers (this is preferable to toEnum).
Cheers,
Simon
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe