sonowz / advent-of-code-haskell

Advent of code solutions with Haskell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Advent of Code Haskell Solution

This solution aims to write elegant, production level code.

  • relude package is used as alternative Prelude
  • Use newtypes for better readablity and more strict typecheck
  • Use typeclasses for composability
  • Use pure functions (which never throw exception) only, except functions in input processing

Instruction

# Runs code in year 2019, day 1 with input file stored in 'inputs/' directory.
./run.sh 2019 01

2018 Solutions

Solutions in 2018 does NOT belong to this stack project.

In order to build & run 2018 code, you might want to use plain GHC:

ghc Day01.hs -o Day01
./Day01 < ../inputs/Y2018/Day01.txt

About

Advent of code solutions with Haskell

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Haskell 98.3%Language:Python 0.9%Language:Nix 0.7%Language:Shell 0.1%