type Day = Int
readFile filepath
where
filepath = "inputs/day" ++ show day ++ ".txt"
readFile filepath
where
filepath = "inputs/day" ++ show day ++ "-sample.txt"
do
if calculated == solution
then print calculated
else hPutStr stderr $ "Incorrect: got '" ++ show calculated ++ "' expecting '" ++ show solution ++ "'\n"
where
calculated = Just $ f content
data Puzzle = Sample | Puzzle | AllPuzzles
data Part = Part1 | Part2 | AllParts
do
let run = aoc day part1 part2
run AllPuzzles Part1
run AllPuzzles Part2
aoc day part1 part2 AllPuzzles Part1 = do
let run = aoc day part1 part2
run Sample Part1
run Puzzle Part1
aoc day part1 part2 AllPuzzles Part2 = do
let run = aoc day part1 part2
run Sample Part2
run Puzzle Part2
aoc day part1 part2 Sample AllParts = do
let run = aoc day part1 part2
run Sample Part1
run Sample Part2
aoc day part1 part2 Puzzle AllParts = do
let run = aoc day part1 part2
run Puzzle Part1
run Puzzle Part2
aoc day part1 part2 Sample Part1 = do
let run = aoc day part1 part2
undefined
aoc day part1 part2 Sample Part2 = do
let run = aoc day part1 part2
undefined
aoc day part1 part2 Puzzle Part1 = do
let run = aoc day part1 part2
undefined
aoc day part1 part2 Puzzle Part2 = do
let run = aoc day part1 part2
undefined