SocketPrim.socketToHandle

Simon Marlow simonmar@microsoft.com
Mon, 27 Aug 2001 12:11:18 +0100


> Currently this functions has the type
>=20
> > SocketPrim.Socket -> PrelHandle.IOMode -> IO PrelIOBase.Handle
>=20
> Could you change the order of the arguments, please? I can`t see
> any particular requirement of the socket being the first argument,
> but swapping it with IOMode would eliminate an additional 'flip'
> when mapping socketToHandle over a list of sockets, e.g.:
>=20
> > handles <- mapM (socketToHandle ReadMode) sockets

Yes, but currently it matches the argument order of openFile.  On the
grounds that the change is unforced and would break existing programs,
I'm not enclined to change it.  However, if there's a concensus then
this kind of change can happen when we switch over to the new libraries
- libraries@haskell.org is the right place to discuss this.

Cheers,
	Simon