Skip main navigation

Brief History of Haskell

Once upon a time, there was a mathematician named Alonzo Church at Princeton University. Church was Alan Turing’s PhD supervisor. Church devised a mathematical model of functions called lambda calculus. …

Course Feedback

At this half-way stage of the course, Jeremy will record a short feedback video that reviews the first three weeks, to address some of your comments and questions. The video …

Grow a Tree

In Computer Science, trees grow upside-down. The unique root is at the top, and the leaves are at the bottom. The binary tree data type is often used for storing …

Type Classes

Inevitably, we have glossed over some of the more complex parts of Haskell while we have been introducing the language. Now it’s time to explore one of the ideas we …

Summary

The basic mechanism for computing on any datastructure in Haskell is recursion. Recursion always has a base case and an induction case. For lists, the base case is the empty …

Define Your Own Data Types

So far we have looked at the basic built-in data types like Int and Boolean. We can combine these basic types to generate custom data types, using algebraic sums and …

Guessing Game

Now let’s put together everything we have learned this week. We are going to write a moderately long Haskell program, consisting of multiple functions and I/O actions. Guessing Game The …

How to Run GHCi

We used the online Haskell interpreter (tryhaskell) for the first few programming exercises. Now we want to move to GHCi, for some larger and more complex Haskell development.

Why I/O?

Computers interact with the outside world via input and output (I/O). The Haskell programming language has specific support for I/O operations, which we will explore in the next few steps.

I/O and a First Encounter with Monads

Pure Functions So far, we have concentrated on pure functions. These kinds of functions take values as arguments, do some processing of those values, then return a result value. A …

Installing Haskell for Yourself

GHC stands for the ‘Glasgow Haskell Compiler’. This is actually a set of components that allow you to execute Haskell programs on your local machine. GHC works on Windows, Mac …

Recommended Reading

Jeremy visited Simon Thompson at the University of Kent to find out about Haskell textbooks. Simon has a huge collection of programming language books. Book Recommendations Simon mentions four textbooks …