hPrint package:base

Computation hPrint hdl t writes the string representation of t given by the show function to the file or channel managed by hdl and appends a newline. This operation may fail with the same errors as hPutStrLn

Examples

>>> hPrint stdout [1,2,3]
[1,2,3]
>>> hPrint stdin [4,5,6]
*** Exception: <stdin>: hPutStr: illegal operation (handle is not open for writing)
Similar to printf, except that output is via the specified Handle. The return type is restricted to (IO a).
The HPrintfType class provides the variable argument magic for hPrintf. Its implementation is intentionally not visible from this module.