get package:base

Consumes and returns the next character. Fails if there is no input left.
Consumes and returns the next character. Fails if there is no input left.
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'
The getContents operation returns all user input as a single string, which is read lazily as it is needed. getContents is implemented as hGetContents stdin. This operation may fail with the same errors as hGetContents.

Examples

>>> getContents >>= putStr
> aaabbbccc :D
aaabbbccc :D
> I hope you have a great day
I hope you have a great day
> ^D
>>> getContents >>= print . length
> abc
> <3
> def ^D
11
Read a line from the standard input device. getLine is implemented as hGetLine stdin. This operation may fail with the same errors as hGetLine.

Examples

>>> getLine
> Hello World!
"Hello World!"
>>> getLine
>
""
Returns the number of Haskell threads that can run truly simultaneously (on separate physical processors) at any given time. To change this value, use setNumCapabilities.
Return a lazy list representing the contents of the supplied Chan, much like hGetContents.
Returns the MaskingState for the current thread.
Will the given BacktraceMechanism be used when collecting backtraces?
Retrieve all ExceptionAnnotations of the given type from an ExceptionContext.