Skip to content
Advent of Code 2019 solutions
Branch: master
Clone or download
Latest commit 10d20ac Dec 16, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
common Update Search.hs Dec 15, 2019
execs Update Day16.hs Dec 16, 2019
inputs Day 16 Dec 16, 2019
.ghcid Day 2 Dec 2, 2019
.gitignore initial commit Dec 1, 2019
LICENSE initial commit Dec 1, 2019 Update Dec 7, 2019
advent2019.cabal Day 16 Dec 16, 2019
doctests.hs Update doctests.hs Dec 3, 2019

Advent of Code 2019

These are my Advent of Code 2019 solutions. I try to focus on making clean and documented Haskell solutions to each puzzle.

We'll be chatting about AoC on IRC all December. You can find AoC discussion on freenode's ##adventofcode and #haskell (webchat)


I recommend installing ghc with ghcup.

$ curl -sSf | sh

I'm using GHC 8.8.1 this year

$ ghcup install 8.8.1
$ ghcup set     8.8.1

cabal-install-3 is the best way to get things built

$ cabal update
$ cabal build

Running solutions

All the solutions take an optional command line argument that can be an input file name or - to read the input from stdin.

$ cabal run Day01

Intcode Interpreter

A few of my solutions rely on a common Intcode interpreter: Intcode.hs

Common libraries used

  • containers - Almost all of the solutions will benefit from having access to Map and Set types from this package.
  • megaparsec - Each problem features a simple text-file format input. Parser combinators make it easy to define the simple parser needed to consume these inputs.
  • doctest - Having checked examples in the documentation makes it easier to understand what code does and easy to add unit tests.
You can’t perform that action at this time.