print package:pathtype

The print function outputs a value of any printable type to the standard output device. Printable types are those that are instances of class Show; print converts values to strings for output using the show operation and adds a newline. For example, a program to print the first 20 integers and their powers of 2 could be written as:
main = print ([(n, 2^n) | n <- [0..19]])
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: