This workspace is sorta convenient:
-
generate.py <year>generates files insrc/Advent/Year<year>and the imports inapp/Main.hsand adds toexposed-modulesinadvent.cabal. -
Advent.Runner.THgenerates a function that runs the solution given the year, day, and subproblem (A or B). -
To run a solution, simply do
cabal run advent -- <year> <day><part>..., for example,cabal run advent -- 2020 1a 1b.
Feel free to use this as a template for yourself, maybe add tests and benchmarks or something.
My own solutions will be on a separate branch.