hPrint package:base-prelude

Computation hPrint hdl t writes the string representation of t given by the shows function to the file or channel managed by hdl and appends a newline. This operation may fail with:
Similar to printf, except that output is via the specified Handle. The return type is restricted to (IO a).