In accordance with tradition, we begin with a tiny example program that prints a friendly greeting.
This is the complete source for this program.
main = putStrLn "hello world"Put the code into a file named hello-world.hs.
Use the runhaskell command to run the program.
$ runhaskell hello-world.hs
hello worldA Haskell program can also be compiled. For this we use GHC (the Glasgow Haskell Compiler).
$ ghc hello-world.hs
$ ls
hello-world hello-world.hi hello-world.hs hello-world.oThen we can execute the hello-world binary.
$ ./hello-world
hello worldNext: Continual checking

