Monday, December 5, 2016

macOS Sierra: Haskell (programming language): Hello, World! Program

Command:

$ cat helloworld.hs


Result:

main = putStrLn "Hello, World!"


Command:

$ ghc helloworld.hs


Result:

[1 of 1] Compiling Main             ( helloworld.hs, helloworld.o )
Linking helloworld ...


Command:

$ ./helloworld


Result:

Hello, World!