Lesson 1. Getting started with Haskell

 

After reading lesson 1, you’ll be able to

  • Install tools for Haskell development
  • Use GHC and GHCi
  • Use tips for writing Haskell programs

1.1. Welcome to Haskell

Before you dive into learning Haskell, you need to become familiar with the basic tools you’ll be using on your journey. This lesson walks you through getting started with Haskell. The lesson starts with downloading the basics to write, compile, and run Haskell programs. You’ll then look at example code and start thinking about how to write code in Haskell. After this lesson, you’ll be ready to dive in!

1.1.1. The Haskell Platform

The worst part of learning a new programming language is getting your development environment set up for the first time. Fortunately, and somewhat surprisingly, this isn’t a problem at all with Haskell. The Haskell community has put together a single, easily installable package of useful tools referred to as the Haskell Platform. The Haskell Platform is the “batteries included” model of packaging a programming language.

The Haskell Platform includes the following:

  • The Glasgow Haskell Compiler (GHC)
  • An interactive interpreter (GHCi)
  • The stack tool for managing Haskell projects
  • A bunch of useful Haskell packages

The Haskell Platform can be downloaded from www.haskell.org/downloads#platform. From there, follow the directions for installing on your OS of choice. This book uses Haskell version 8.0.1 or higher.

1.1.2. Text editors

1.2. The Glasgow Haskell Compiler

1.3. Interacting with Haskell—GHCi

1.4. Writing and working with Haskell code

Summary

sitemap