Introduction To Haskell
Hello World

Introduction

This is an odd place to start your journey with Haskell, as you will come to find out as you work through the pages in the section. Outputting string literals is your usual starting place with a programming language, so let's get it out of our system now.

Launch WinGHCI to get yourself started. You will see something like this,

WinGHCI

The prompt you see, Prelude is the name of the default library loaded when you run WinGHCI. It contains a handful of basic functions that are good enough for us on the start of our Haskell exploration.

Programming

Here are two statements for outputting a string to the console. String literals in Haskell have to be quoted as they would in other languages.

putStr "Hello World"
putStrLn "Hello World"

Try the two statements in order and the difference between them is clear.

WinGHCI