Crash with native Win IO
Summary
New native Win I/O crashes a simple ansi-terminal program.
Steps to reproduce
- boot your Win machine;
- fetch GHC 9.2.*;
- init a simple cabal project, adding
ansi-terminalas a dependency, and addwith-rtsopts=--io-manager=nativeinghc-options; - in
Main.hs, writemodule Main where import System.Console.ANSI main :: IO () main = do clearScreen - run it and see it crash with
{handle: <stdout>}: handleToHANDLE: inappropriate type (not a file HANDLE).
Expected behavior
Program clears screen, does not crash.
Environment
x86_64-mingw32
Comment
I have filed a bug against ansi-terminal, the maintainer sent me here. According to packdeps ansi-terminal has 254 reverse dependencies.