Opened 20 months ago

Last modified 5 months ago

#11394 new task

Base should use native Win32 IO on Windows

Reported by: bgamari Owned by:
Priority: normal Milestone: 8.4.1
Component: Core Libraries Version: 7.10.3
Keywords: Cc: ekmett, Phyx-
Operating System: Windows Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by simonpj)

There are a variety of issues caused by the impedance mismatch between GHC's use of Posix I/O interfaces on Windows (particularly with respect to console I/O),

  • #10542: Incorrect Unicode input on Windows Console
  • #7593: Unable to print exceptions of unicode identifiers
  • #4471: Incorrect Unicode output on Windows Console
  • #2189: hSetBuffering stdin NoBuffering doesn't work on Windows

As pointed on in ticket:2189#comment:12 the ultimate solution to this would be to move all of GHC's IO to use the respective Win32 interfaces.

Also relevant

  • #7353: Windows lacks support in the I/O manager
  • #806: hGetBufNonBlocking doesn't work on Windows
  • #3081: Double output after Ctrl+C on Windows
  • #13440: putStr has different behaviour on Windows

Change History (6)

comment:1 Changed 20 months ago by bgamari

Operating System: Unknown/MultipleWindows

comment:2 Changed 19 months ago by Phyx-

I think Joey's IOCP based manager from #11394 could be a good start for this.

We should see how easy it is to bring his old code up to date on GHC now and how much of it can be re-used https://github.com/joeyadams/haskell-iocp

Might also want to consider support for Registered I/O which would significantly up the throughput for Windows Based server programs. It's a recent addition to Windows 8+, but might be worth a look at https://technet.microsoft.com/en-us/library/hh997032.aspx.

Version 0, edited 19 months ago by Phyx- (next)

comment:3 Changed 19 months ago by Phyx-

Cc: Phyx- added

comment:4 Changed 8 months ago by Phyx-

Milestone: 8.4.1

comment:5 Changed 5 months ago by simonpj

Description: modified (diff)

comment:6 Changed 5 months ago by Phyx-

I'm currently working on this and a few other things for my 8.4 contributions. But I'll refrain from mass assigning all these issues to me until I know for sure I can get it done. Currently it looks viable though.

Note: See TracTickets for help on using tickets.