Setup.hs

Setting up your Haskell Toolchain in 2023

Setup.hs

You can read all the Haskell articles you want, but unless you write the code for yourself, you'll never get anywhere! But there are so many different tools and ideas floating around out there, so how are you supposed to know what to do? How do you even get started writing a Haskell project? And how can you make your development process as efficient as possible?

Setup.hs is designed to help you answer those questions! Newcomers to Haskell will learn all the basics of building and running your code. More experienced Haskellers will get some new tools for managing all your programs, as well as some tips for integrating Haskell features into your code editor!

Here's what you'll learn in the course:

  1. How to install and manage all of the core Haskell tools (GHC, Cabal, Stack)
  2. What components you need in your Haskell project and how you can build and run them all
  3. How to get your editor to use advanced features, like flagging compilation errors and providing autocomplete suggestions.

We'll do all of this in a hands-on way with detailed, step-by-step exercises!

Course Content and Outline

The course content consists of 3 elements:

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

In video lectures, we'll introduce the core concepts of the lesson, including a breakdown of some of the implementation details.

Then you'll 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, running the commands, and applying the concepts yourself, you'll build up the confidence to use these ideas in your own projects.

Finally, the walkthrough videos will show these concepts in action, so you can follow along in case you get stuck. There's a separate series of walkthrough videos for Windows, MacOS, and Linux, since each of these have their own setup quirks!

This short course consists of roughly three different parts. Here are the different areas you'll cover:

Install Haskell Tools

Haskell has a surprising number of programs working under the hood. And all of them get updated quite regularly, resulting in a lot of version combinations! But in the last couple years, GHCup has made it easier than ever to keep all these tools up to date. The first thing you'll learn in the course is how to use GHCup to get all your tools installed and how to switch between different versions.

Understand Haskell Project Structure

Once everything's installed, we'll explore what it actually looks like to create a Haskell project using Stack, the easiest and most popular Haskell build system. You'll learn the structure of a Haskell project, with its library, executables, test suites and benchmarks. You'll use Stack to build, run and test your Haskell code using these different components.

Integrate Editors with Haskell

As early as 2018 I had wanted to do a blog series on Haskell IDE integrations. But I mostly abandoned the idea because it was really quite difficult. Extensions and plugins existed, but they were always pegged to a specific GHC version, and they often lagged behind the latest release by quite a bit.

But now things are much easier thanks to the Haskell Language Server. This tool comes with GHCup, and it enables a lot of important features that can be used across many IDEs. To finish up the course, you'll work with 3 different code editors and learn how to enable Haskell features using Haskell Language Server. This will enable you to get immediate feedback on your code as you're writing it, which can be **extremely** helpful for a beginner!

For more details, see the full outline and FAQ below!


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.


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.
The lecture times seem long! How much time will this course take?
The time preview Teachable gives for each lecture includes all the time for the Lecture Video and 3 different walkthrough videos, one for Windows, one for MacOS, and one for Linux. You generally will not need to watch more than one of the walkthrough videos (since they're on different OS's), so you won't spend as much time as the preview suggests.

Get started now!