getChar package:ghc-internal

Read a single character from the standard input device. getChar is implemented as hGetChar stdin. This operation may fail with the same errors as hGetChar.

Examples

>>> getChar
a'a'
>>> getChar
>
'\n'
Computation hGetChar hdl reads a character from the file or channel managed by hdl, blocking until a character is available. This operation may fail with: