Practical Haskell

A Primer for Haskell Industry Tasks

Practical Haskell

How do you actually do something in Haskell? A programming language is only helpful if we can use it to solve real problems. Perhaps you've written up some neat and tidy solutions to small problems with Haskell. But does the language actually have the libraries and tools to build useful programs?

The answer to this question is a resounding Yes! Not only does Haskell have useful libraries for practical problems, but the "Haskell Approach" to these problems often has clear advantages! For instance, in Haskell you can:

  1. Write database queries that are type-safe, interoperating seamlessly with well-defined Haskell types.
  2. Define a web server where the API is clearly laid out and defined in terms of Haskell types.
  3. Link your Haskell types to frontend types that will populate your Web UI
  4. Organize "effects" within your system so that the capabilities of different functions are explicitly defined and known to your program at compile-time.
  5. Use monads to describe a test case in plan language.

These ideas can supercharge your Haskell abilities! But they aren't necessarily easy to pick up. It takes a fair amount of commitment to learn them well enough to use in your own projects.

Luckily, Monday Morning Haskell has a great tool for you to learn these skills! Our Practical Haskell Course will teach you how to build a functional application that integrates systems like databases, web servers, frontend web pages, and behavioral tests.

If this sounds like exactly what you've been looking for to rapidly improve your Haskell, click that "Enroll" button above, or read on for more details!

Course Content and Outline

The course content consists of 3 elements:

  1. Video Lectures
  2. Screencast Videos
  3. Programming Exercises

In video lectures, your teacher will introduce the core concepts of the lesson, including an in-depth breakdown of the code you need to implement the feature.

Screencast videos will show these concepts in action, in an IDE, so you can follow along.

Finally, you'll then get the chance to try the concepts for yourself with our detailed programming exercises. These exercises are the most important part of the course! By writing the code and applying the concepts yourself, you'll build up the confidence to use these ideas in your own projects.

The course consists of 5 different modules. Here are the different areas you'll cover:

Module 1: Databases

Learn how to use the Persistent library to store your information in a database. You'll see how to build a schema using Template Haskell, and how to easily migrate a Postgres database to fit in with the schema.

Module 2: Web Servers

In the second module, we'll explore the Servant library, which allows you to build type-safe, easy-to-understand APIs. You'll use this library to construct a functional web server that interacts with your database.

This part also includes learning how to deploy your web server using Heroku, and run automated tests with CircleCI!

Module 3: Web Frontend (Elm)

In this module we will technically step away from Haskell and experiment with Elm, a language that is syntactically very similar but is specialized for building frontend web applications. You'll build some simple pages that will interact with the server you built in module 2!

Module 4: Organizing Effects

One of Haskell's biggest strengths is that you can specify at compile-time (using monads) what behavior each function can actually perform. You can restrict it so that most of your program is "pure" and cannot do arbitrary IO actions like opening up files. This limits the surface area for bugs and difficult-to-debug code.

In this module, we'll explore a couple different ways for you to organize the effects in your server program. Monad classes and free monads both allow you to have functions that perform limited kinds of IO (like reading from your database) without opening the door for arbitrary IO.

Module 5: Effective Testing

In this final module, you'll learn all about testing in Haskell. We'll go over basic unit test practices, benchmarking and profiling. We'll also see how to test more complicated programs (like your web server) and how to use monads to construct test cases that non-technical users can understand!

For a lecture-by-lecture walkthrough and FAQ, keep scrolling!

Your Instructor

James Bowen
James Bowen

James is a Software Engineer living in Atlanta, GA. He first discovered Haskell in college, but began using it consistently since 2015. His Haskell experience blends multiple side projects as well as professional work. In late 2016, he began the Monday Morning Haskell blog, where he publishes new Haskell content every week.

Course Curriculum

Frequently Asked Questions

When does the course start and finish?
The course starts now and never ends! It is a completely self-paced online course - you decide when you start and when you finish.
How long do I have access to the course?
How does lifetime access sound? After enrolling, you have unlimited access to this course for as long as you like - across any and all devices you own.
What if I am unhappy with the course?
We would never want you to be unhappy! If you are unsatisfied with your purchase, contact us in the first 14 days and we will give you a full refund.

Get started now!