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

2009-03-26 Thread Felix Martini
 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?

Yes. When Simon adds the new Handle API to GHC i will add support for
creating Haskell handles that will be implemented internally with
Windows handles and call WinAPI functions. The current winio package
contains mostly low-level functions that directly expose Windows
handles which is useful for writing server code etc.

Eventually when the library is stable i would prefer if it becomes
part of GHC's libraries (or a new default Haskell I/O library for all
operating systems).

Regards,
Felix
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2009-03-25 Thread Andrew Coppin

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?


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2009-03-21 Thread Felix Martini
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.

Kind Regards,
Felix
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe