项目作者: sonowz

项目描述 :
Advent of code solutions with Haskell
高级语言: Haskell
项目地址: git://github.com/sonowz/advent-of-code-haskell.git
创建时间: 2019-09-30T08:42:34Z
项目社区:https://github.com/sonowz/advent-of-code-haskell

开源协议:BSD 3-Clause "New" or "Revised" License

下载


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

  1. # Runs code in year 2019, day 1 with input file stored in 'inputs/' directory.
  2. ./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:

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