Advent of Code Template

Hi, I’ve created a template for advent of code which might be very usefull for those who just want to try Haskell this year. The template is actually a Github template, so you can create a repo from It by just clicking “Use this template”

The main features it provides are:

  • A sensible set of “light” dependencies for AoC (It could be lighter tought).
  • A very simple bash command-line interface (CLI) which:
    • Can create Haskell executable files for each new Advent of Code day.
    • Can run solutions for each day with ease.
    • Automatically manage Cabal files, reducing setup hassles.
  • VSCode tasks for seamless interaction with the CLI. Press CTRL+Shift+P to open the command panel and type “run task” to see all available tasks.

The idea is that newcommers to the language don’t have to mess with dependencies, nor cabal nor .cabal file (or stack) at all. AoC tipycally requires either building one executable per day or building one module per day, so It can be a little bit overwhelming if you have to learn Haskell and cabal both at the same time. Also, the set of dependencies is sufficiently good for any AoC season.

17 Likes

Great idea. Have you thought of including tests? My standard structure for each AoC day includes a HUnit test that checks the example given plus some unit tests for working up to that on difficult days. Happy to contribute a PR if you are interested.

1 Like

That seems like a good Idea!! I’d be happy if you contribute

1 Like

I’m afraid after a second glance, I can’t provide a PR. But I did raise an issue with code snippets.

1 Like