Hello world

In accordance with tradition, our first example program will print a friendly greeting.

This is the complete source for this program.

Put the code into a file named hello-world.hs.

Use the runhaskell command to run the program.

A Haskell program can also be compiled. For this we use GHC (the Glasgow Haskell Compiler).

Then we can execute the hello-world binary.