[GHC] #11394: Base should use native Win32 IO on Windows

GHC ghc-devs at haskell.org
Mon Aug 20 07:11:04 UTC 2018


#11394: Base should use native Win32 IO on Windows
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:  Phyx-
            Type:  task              |               Status:  new
        Priority:  normal            |            Milestone:  8.8.1
       Component:  Core Libraries    |              Version:  7.10.3
      Resolution:                    |             Keywords:
Operating System:  Windows           |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:  806, 2189,
                                     |  2408, 4471, 7353, 7593, 10542,
                                     |  12873, 14530
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Old description:

> 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

New description:

 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
  * #4942: `GHC.ConsoleHandler` does not call back application when Close
 button is pressed.

--

Comment (by Phyx-):

 Started designing the last piece of the puzzle which is non-threaded RTS.
 The non-threaded I/O manager seems to have a completely different
 interface on Windows, going so far as to having 3 Windows only prim-ops.
 Trying to understand why...

 With the threaded RTS I still have to track down a race condition
 somewhere. I think it has to do with the foreign pointer's finalizers...
 Wonder if I can turn off GC completely.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11394#comment:23>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list