io-manager, stack GHCI and control-C behaviour on Windows
Apparently there were long standing issues with control-C behaviour of GHCi and console functions (buffering) on Windows. Those very finally resolved in GHC 9.0 with io-manager=native, see:
- https://mail.haskell.org/pipermail/ghc-devs/2020-July/019053.html
- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/1224
- https://downloads.haskell.org/ghc/latest/docs/html/users_guide/9.0.1-notes.html?highlight=managernew i/o manager
However:
- If I do use threadDelay with io-manager=native the program hangs up.
- If I do use hSetBuffering I have to use io-manager=native.
- If I do run with stack ghci and interrupt the runtime with Control+C I get strange behaviours in the console.
- If I do run with plain ghci it works but I cannot use stack modules. => I have to restart the terminal and GHCi everytime I interrupted with Control+C
It may be an issue with stack only and not ghci, see:
- https://github.com/commercialhaskell/stack/issues/610
- https://github.com/commercialhaskell/stack/issues/4737
- https://haskell-foundation.slack.com/archives/C023K8HTTCH/p1631037988005300
but everyone is acting like that doesn't happen and no one uses Haskell on Windows anyway o_O