no-buffering-workaround-0.1.0.0: Workaround for GHC bug #2189.

Safe HaskellSafe
LanguageHaskell2010

System.IO.NoBufferingWorkaround

Description

This package exists as a workaround for GHC bug #2189, "hSetBuffering stdin NoBuffering doesn't work on Windows". It provides functionality for reading from standard input without buffering, in a way that works under GHC on Windows as well as other configurations. This is useful for key-driven console applications such as roguelikes.

Synopsis

Documentation

initGetCharNoBuffering :: IO () Source

Must be called before invoking getCharNoBuffering.

getCharNoBuffering :: IO Char Source

Behaves like getChar, but never does any buffering.