Printing in Haskell

Glynn Clements glynn.clements@virgin.net
Thu, 27 Mar 2003 04:00:16 +0000


Weix, Rachel Lynn wrote:

> How do I print something in Haskell, i.e. if I want to print what a
> certain variable contains, etc.?  (Synomous to cout> in C++, printf in
> C, System.out.println in Java, display in Scheme, etc.)

Use "putStrLn" to print a string; use "show" to convert a value to a
string.

See:
	http://www.haskell.org/tutorial/io.html

for more information about I/O in Haskell.

-- 
Glynn Clements <glynn.clements@virgin.net>