Function missing ?
Dear Bug-hunters,
In the documentation of 'Socket' the following is
defined :
data PortID = PortNumber PortNumber | ... -- excluded
the rest...
data PortNumber -- instance of ...
mkPortNumber :: Int -> PortNumber
But 'mkPortNumber' is *NOT* present in the actual
implementation, which presents me with the problem that
I cannot convert an Int to a PortNumber (or PortID,
which
is what is actually needed...).
Here is a (minimal) example of my intended usage
(in a module intended to encapsulate communication to a
server in a specific protocol...) :
myConnect :: String -> Int -> IO MyConnection
myConnect server port = do
sock <- connectTo server (PortNumber (mkPortNumber
port))
return sock
I may be that I'm in error here, but I strongly feel
that
something is missing from the 'Socket' library...
Kind Regards, Alex...
Trac metadata
Trac field | Value |
---|---|
Version | 5.02 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | ResolvedFixed |
Component | hslibs/net |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |