[Haskell-cafe] [ANN] I/O library for Windows

Andrew Coppin andrewcoppin at btinternet.com
Wed Mar 25 17:26:33 EDT 2009

Felix Martini wrote:
> Hi all,
> winio is an I/O library for Windows using Windows API functions and
> has I/O completion port support. The main goal of this library is to
> support Simon Marlow's new Handle API once he has added that to GHC.
> The library also has a compatibility module for socket functions from
> the network-bytestring package. Because the library uses IOCP instead
> of select it is not limited to 1024 open sockets. Try for example the
> thread-ring program where each Haskell thread passes a UDP message
> around (Change the MaxUserPort field in
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
> to 65534 to enable all ports).
> The winio package is available on Hackage. Notice that it uses a
> development version of the network package which is available at
> http://darcs.haskell.org/packages/network/. The library has not been
> tested much and should be considered experimental so please try it if
> you use Windows and notify me of any issue or corner case.

As I understand it, programs compiled with GHC currently use MSYS for 
all I/O operations, resulting in all kinds of strange behaviour in 
corner cases. (E.g., if you use System.Directory and ask whether "C:\\" 
is a directory, it says no, yet you can read the contents of that 
directory.) I would have thought that calling the Win32 API directly 
would probably fix most of these minor glitches. Is that what this 
package is intending to do?

More information about the Haskell-Cafe mailing list