From 370be28bb55da1155a0b3636f9e9d12d6ece7861 Mon Sep 17 00:00:00 2001 From: Daniele Fucini Date: Sun, 15 Dec 2024 19:04:53 +0100 Subject: [PATCH] Rename days 1-9 with heading zero --- adventofcode2024.cabal | 36 ++++++------- src/{Day1 => Day01}/Puzzle1.hs | 6 +-- src/{Day1 => Day01}/Puzzle2.hs | 6 +-- src/{Day2 => Day02}/Puzzle1.hs | 6 +-- src/{Day2 => Day02}/Puzzle2.hs | 6 +-- src/{Day3 => Day03}/Puzzle1.hs | 6 +-- src/{Day3 => Day03}/Puzzle2.hs | 6 +-- src/{Day4 => Day04}/Puzzle1.hs | 6 +-- src/{Day4 => Day04}/Puzzle2.hs | 6 +-- src/{Day5 => Day05}/Puzzle1.hs | 6 +-- src/{Day5 => Day05}/Puzzle2.hs | 6 +-- src/{Day6 => Day06}/Puzzle1.hs | 6 +-- src/{Day6 => Day06}/Puzzle2.hs | 6 +-- src/{Day7 => Day07}/Puzzle1.hs | 6 +-- src/{Day7 => Day07}/Puzzle2.hs | 6 +-- src/{Day8 => Day08}/Puzzle1.hs | 6 +-- src/{Day8 => Day08}/Puzzle2.hs | 6 +-- src/{Day9 => Day09}/Puzzle1.hs | 6 +-- src/{Day9 => Day09}/Puzzle2.hs | 6 +-- src/Main.hs | 94 +++++++++++++++++----------------- 20 files changed, 119 insertions(+), 119 deletions(-) rename src/{Day1 => Day01}/Puzzle1.hs (85%) rename src/{Day1 => Day01}/Puzzle2.hs (88%) rename src/{Day2 => Day02}/Puzzle1.hs (88%) rename src/{Day2 => Day02}/Puzzle2.hs (91%) rename src/{Day3 => Day03}/Puzzle1.hs (86%) rename src/{Day3 => Day03}/Puzzle2.hs (90%) rename src/{Day4 => Day04}/Puzzle1.hs (93%) rename src/{Day4 => Day04}/Puzzle2.hs (94%) rename src/{Day5 => Day05}/Puzzle1.hs (91%) rename src/{Day5 => Day05}/Puzzle2.hs (94%) rename src/{Day6 => Day06}/Puzzle1.hs (97%) rename src/{Day6 => Day06}/Puzzle2.hs (98%) rename src/{Day7 => Day07}/Puzzle1.hs (91%) rename src/{Day7 => Day07}/Puzzle2.hs (94%) rename src/{Day8 => Day08}/Puzzle1.hs (95%) rename src/{Day8 => Day08}/Puzzle2.hs (96%) rename src/{Day9 => Day09}/Puzzle1.hs (94%) rename src/{Day9 => Day09}/Puzzle2.hs (97%) diff --git a/adventofcode2024.cabal b/adventofcode2024.cabal index c097917..5707eaa 100644 --- a/adventofcode2024.cabal +++ b/adventofcode2024.cabal @@ -33,24 +33,24 @@ executable adventofcode2024 -Wpartial-fields -Wredundant-constraints other-modules: - Day1.Puzzle1 - Day1.Puzzle2 - Day2.Puzzle1 - Day2.Puzzle2 - Day3.Puzzle1 - Day3.Puzzle2 - Day4.Puzzle1 - Day4.Puzzle2 - Day5.Puzzle1 - Day5.Puzzle2 - Day6.Puzzle1 - Day6.Puzzle2 - Day7.Puzzle1 - Day7.Puzzle2 - Day8.Puzzle1 - Day8.Puzzle2 - Day9.Puzzle1 - Day9.Puzzle2 + Day01.Puzzle1 + Day01.Puzzle2 + Day02.Puzzle1 + Day02.Puzzle2 + Day03.Puzzle1 + Day03.Puzzle2 + Day04.Puzzle1 + Day04.Puzzle2 + Day05.Puzzle1 + Day05.Puzzle2 + Day06.Puzzle1 + Day06.Puzzle2 + Day07.Puzzle1 + Day07.Puzzle2 + Day08.Puzzle1 + Day08.Puzzle2 + Day09.Puzzle1 + Day09.Puzzle2 Day10.Puzzle1 Day11.Puzzle1 Day11.Puzzle2 diff --git a/src/Day1/Puzzle1.hs b/src/Day01/Puzzle1.hs similarity index 85% rename from src/Day1/Puzzle1.hs rename to src/Day01/Puzzle1.hs index e229270..7859825 100644 --- a/src/Day1/Puzzle1.hs +++ b/src/Day01/Puzzle1.hs @@ -1,14 +1,14 @@ {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} -module Day1.Puzzle1 (day1_1) where +module Day01.Puzzle1 (day01_1) where import Data.List (sort, transpose) listDistance :: [Int] -> [Int] -> Int listDistance xs ys = sum $ map abs $ zipWith (-) (sort xs) (sort ys) -day1_1 :: IO () -day1_1 = do +day01_1 :: IO () +day01_1 = do contents <- lines <$> readFile "input/day1.txt" let [x, y] = transpose $ map read . words <$> contents putStrLn $ diff --git a/src/Day1/Puzzle2.hs b/src/Day01/Puzzle2.hs similarity index 88% rename from src/Day1/Puzzle2.hs rename to src/Day01/Puzzle2.hs index dbee072..f953407 100644 --- a/src/Day1/Puzzle2.hs +++ b/src/Day01/Puzzle2.hs @@ -1,6 +1,6 @@ {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} -module Day1.Puzzle2 (day1_2) where +module Day01.Puzzle2 (day01_2) where import Data.List (group, sort, transpose, uncons) import Data.Maybe (fromJust) @@ -10,8 +10,8 @@ similarityScore xs ys = let elemsY = [(fst . fromJust $ uncons y, length y) | y <- (group . sort) ys] in sum [x * snd y | x <- xs, y <- elemsY, x == fst y] -day1_2 :: IO () -day1_2 = do +day01_2 :: IO () +day01_2 = do contents <- lines <$> readFile "input/day1.txt" let [x, y] = transpose $ map read . words <$> contents putStrLn $ diff --git a/src/Day2/Puzzle1.hs b/src/Day02/Puzzle1.hs similarity index 88% rename from src/Day2/Puzzle1.hs rename to src/Day02/Puzzle1.hs index 7907506..8570fa2 100644 --- a/src/Day2/Puzzle1.hs +++ b/src/Day02/Puzzle1.hs @@ -1,4 +1,4 @@ -module Day2.Puzzle1 (day2_1) where +module Day02.Puzzle1 (day02_1) where import Data.List (sort, sortBy) import Data.Ord @@ -10,8 +10,8 @@ isSafe xs = (isAscending xs || isDescending xs) && maximum distances <= 3 && min isDescending x = x == sortBy (comparing Down) x distances = map abs $ zipWith (-) xs (drop 1 xs) -day2_1 :: IO () -day2_1 = do +day02_1 :: IO () +day02_1 = do contents <- lines <$> readFile "input/day2.txt" let reports = map read . words <$> contents putStrLn $ diff --git a/src/Day2/Puzzle2.hs b/src/Day02/Puzzle2.hs similarity index 91% rename from src/Day2/Puzzle2.hs rename to src/Day02/Puzzle2.hs index 1ea8565..028d567 100644 --- a/src/Day2/Puzzle2.hs +++ b/src/Day02/Puzzle2.hs @@ -1,4 +1,4 @@ -module Day2.Puzzle2 (day2_2) where +module Day02.Puzzle2 (day02_2) where import Data.List (inits, sort, sortBy, tails) import Data.Ord @@ -16,8 +16,8 @@ removeLevel xs = zipWith (++) ys zs ys = map init $ drop 1 (inits xs) zs = map (drop 1) $ init (tails xs) -day2_2 :: IO () -day2_2 = do +day02_2 :: IO () +day02_2 = do contents <- lines <$> readFile "input/day2.txt" let reports = map read . words <$> contents putStrLn $ diff --git a/src/Day3/Puzzle1.hs b/src/Day03/Puzzle1.hs similarity index 86% rename from src/Day3/Puzzle1.hs rename to src/Day03/Puzzle1.hs index 82f6744..c29ffeb 100644 --- a/src/Day3/Puzzle1.hs +++ b/src/Day03/Puzzle1.hs @@ -1,4 +1,4 @@ -module Day3.Puzzle1 (day3_1) where +module Day03.Puzzle1 (day03_1) where import Data.List.Split (splitOn) import Text.Regex.TDFA (getAllTextMatches, (=~)) @@ -8,8 +8,8 @@ sumMul xs = let vals = map (splitOn "," . filter (`elem` "0123456789,")) xs in sum $ map (product . map read) vals -day3_1 :: IO () -day3_1 = do +day03_1 :: IO () +day03_1 = do contents <- readFile "input/day3.txt" let mults = getAllTextMatches (contents =~ "mul\\([0-9]+,[0-9]+\\)") :: [String] putStrLn $ diff --git a/src/Day3/Puzzle2.hs b/src/Day03/Puzzle2.hs similarity index 90% rename from src/Day3/Puzzle2.hs rename to src/Day03/Puzzle2.hs index 3800c21..8f64522 100644 --- a/src/Day3/Puzzle2.hs +++ b/src/Day03/Puzzle2.hs @@ -1,4 +1,4 @@ -module Day3.Puzzle2 (day3_2) where +module Day03.Puzzle2 (day03_2) where import Data.List (isPrefixOf) import Data.List.Split (split, splitOn, startsWith) @@ -12,8 +12,8 @@ sumMul xs = filterDonts :: [String] -> String filterDonts = concat . concatMap (filter (not . isPrefixOf "don't()") . split (startsWith "do()")) -day3_2 :: IO () -day3_2 = do +day03_2 :: IO () +day03_2 = do contents <- split (startsWith "don't()") <$> readFile "input/day3.txt" let mults = getAllTextMatches (filterDonts contents =~ "mul\\([0-9]+,[0-9]+\\)") :: [String] putStrLn $ diff --git a/src/Day4/Puzzle1.hs b/src/Day04/Puzzle1.hs similarity index 93% rename from src/Day4/Puzzle1.hs rename to src/Day04/Puzzle1.hs index 65de1eb..d14fdcd 100644 --- a/src/Day4/Puzzle1.hs +++ b/src/Day04/Puzzle1.hs @@ -1,4 +1,4 @@ -module Day4.Puzzle1 (day4_1) where +module Day04.Puzzle1 (day04_1) where import Data.List (isPrefixOf, transpose) @@ -26,8 +26,8 @@ countOccurrences word text = then 1 + countOccurrences' word rest else countOccurrences' w rest -day4_1 :: IO () -day4_1 = do +day04_1 :: IO () +day04_1 = do contents <- lines <$> readFile "input/day4.txt" putStrLn $ "Day 4, Puzzle 1 solution: " diff --git a/src/Day4/Puzzle2.hs b/src/Day04/Puzzle2.hs similarity index 94% rename from src/Day4/Puzzle2.hs rename to src/Day04/Puzzle2.hs index 8db1661..cebc8ee 100644 --- a/src/Day4/Puzzle2.hs +++ b/src/Day04/Puzzle2.hs @@ -1,4 +1,4 @@ -module Day4.Puzzle2 (day4_2) where +module Day04.Puzzle2 (day04_2) where import Data.List (isPrefixOf, tails, transpose) @@ -27,8 +27,8 @@ submatricesVert n matrix@(_ : xxs) = submatrix matrix ++ submatricesVert n xxs where submatrix m = [take n $ map (take n) m] -day4_2 :: IO () -day4_2 = do +day04_2 :: IO () +day04_2 = do contents <- lines <$> readFile "input/day4.txt" let xmas = length . concatMap (filter (\x -> countOccurrences "MAS" x == 2) . submatricesVert 3) . transpose $ map tails contents putStrLn $ "Day 4, Puzzle 2 solution: " ++ show xmas diff --git a/src/Day5/Puzzle1.hs b/src/Day05/Puzzle1.hs similarity index 91% rename from src/Day5/Puzzle1.hs rename to src/Day05/Puzzle1.hs index 0dfdccb..3b8dac3 100644 --- a/src/Day5/Puzzle1.hs +++ b/src/Day05/Puzzle1.hs @@ -1,6 +1,6 @@ {-# OPTIONS_GHC -Wno-incomplete-patterns #-} -module Day5.Puzzle1 (day5_1) where +module Day05.Puzzle1 (day05_1) where import Data.List.Split (splitOn) @@ -13,8 +13,8 @@ isSorted rules (x : xs) = getMiddle :: [String] -> String getMiddle xs = xs !! (length xs `div` 2) -day5_1 :: IO () -day5_1 = do +day05_1 :: IO () +day05_1 = do contents <- map (splitOn "|") . lines <$> readFile "input/day5.txt" let rules = [(x, y) | [x, y] <- takeWhile (/= [""]) contents] updates = concatMap (map (splitOn ",")) . drop 1 $ dropWhile (/= [""]) contents diff --git a/src/Day5/Puzzle2.hs b/src/Day05/Puzzle2.hs similarity index 94% rename from src/Day5/Puzzle2.hs rename to src/Day05/Puzzle2.hs index cb63cd7..d91ca1c 100644 --- a/src/Day5/Puzzle2.hs +++ b/src/Day05/Puzzle2.hs @@ -1,6 +1,6 @@ {-# OPTIONS_GHC -Wno-incomplete-patterns #-} -module Day5.Puzzle2 (day5_2) where +module Day05.Puzzle2 (day05_2) where import Data.List ((\\)) import Data.List.Split (splitOn) @@ -22,8 +22,8 @@ sortOnRules rules (x : xs) = sortOnRules rules beforeArray ++ [x] ++ sortOnRules beforeArray = xs \\ afterArray before = [p | (p, n) <- rules, n == x] -day5_2 :: IO () -day5_2 = do +day05_2 :: IO () +day05_2 = do contents <- map (splitOn "|") . lines <$> readFile "input/day5.txt" let rules = [(read x, read y) | [x, y] <- takeWhile (/= [""]) contents] unsorted = filter (not . isSorted rules) . map (map read) $ concatMap (map (splitOn ",")) . drop 1 $ dropWhile (/= [""]) contents diff --git a/src/Day6/Puzzle1.hs b/src/Day06/Puzzle1.hs similarity index 97% rename from src/Day6/Puzzle1.hs rename to src/Day06/Puzzle1.hs index a0d2bf1..cc8cf85 100644 --- a/src/Day6/Puzzle1.hs +++ b/src/Day06/Puzzle1.hs @@ -1,4 +1,4 @@ -module Day6.Puzzle1 (day6_1) where +module Day06.Puzzle1 (day06_1) where import Data.List (elemIndex, uncons) import Data.Maybe (fromJust, fromMaybe, isJust) @@ -68,8 +68,8 @@ visitGrid (x, y) direction grid = then visitGrid nextPosition newDirection newGrid else newGrid -day6_1 :: IO () -day6_1 = do +day06_1 :: IO () +day06_1 = do contents <- lines <$> readFile "input/day6.txt" let (x, y) = (\a b c d -> fst . fromJust $ uncons $ filter ((>= 0) . fst) [a, b, c, d]) diff --git a/src/Day6/Puzzle2.hs b/src/Day06/Puzzle2.hs similarity index 98% rename from src/Day6/Puzzle2.hs rename to src/Day06/Puzzle2.hs index 058f5ae..e3560ba 100644 --- a/src/Day6/Puzzle2.hs +++ b/src/Day06/Puzzle2.hs @@ -1,4 +1,4 @@ -module Day6.Puzzle2 (day6_2) where +module Day06.Puzzle2 (day06_2) where import Data.List (elemIndex, uncons) import Data.Maybe (fromJust, fromMaybe, isJust) @@ -93,8 +93,8 @@ setGridObstacles startPosition grid = let positions = [(x, y) | x <- [0 .. (length grid - 1)], y <- [0 .. (length (fst . fromJust $ uncons grid) - 1)], (x, y) /= startPosition, getGridVal (x, y) grid == 'X'] in zipWith (`markVisited` '#') positions (replicate (length positions) grid) -day6_2 :: IO () -day6_2 = do +day06_2 :: IO () +day06_2 = do contents <- lines <$> readFile "input/day6.txt" let (x, y) = (\a b c d -> fst . fromJust $ uncons $ filter ((>= 0) . fst) [a, b, c, d]) diff --git a/src/Day7/Puzzle1.hs b/src/Day07/Puzzle1.hs similarity index 91% rename from src/Day7/Puzzle1.hs rename to src/Day07/Puzzle1.hs index 8c13983..eb55ec3 100644 --- a/src/Day7/Puzzle1.hs +++ b/src/Day07/Puzzle1.hs @@ -1,4 +1,4 @@ -module Day7.Puzzle1 (day7_1) where +module Day07.Puzzle1 (day07_1) where import Data.List (transpose) import Data.List.Split (splitOn) @@ -14,8 +14,8 @@ isSolvable cur (result, x : y : ys) = || isSolvable (cur * x + y) (result, ys) || isSolvable (cur * x * y) (result, ys) -day7_1 :: IO () -day7_1 = do +day07_1 :: IO () +day07_1 = do [x, y] <- transpose . map (splitOn ":") . lines <$> readFile "input/day7.txt" let results = map read x values = map read <$> map words y diff --git a/src/Day7/Puzzle2.hs b/src/Day07/Puzzle2.hs similarity index 94% rename from src/Day7/Puzzle2.hs rename to src/Day07/Puzzle2.hs index 855dc78..fccccd0 100644 --- a/src/Day7/Puzzle2.hs +++ b/src/Day07/Puzzle2.hs @@ -1,4 +1,4 @@ -module Day7.Puzzle2 (day7_2) where +module Day07.Puzzle2 (day07_2) where import Data.List (transpose) import Data.List.Split (splitOn) @@ -22,8 +22,8 @@ isSolvable cur (result, x : y : ys) = || isSolvable ((cur `concatInt` x) * y) (result, ys) || isSolvable ((cur `concatInt` x) `concatInt` y) (result, ys) -day7_2 :: IO () -day7_2 = do +day07_2 :: IO () +day07_2 = do [x, y] <- transpose . map (splitOn ":") . lines <$> readFile "input/day7.txt" let results = map read x values = map read <$> map words y diff --git a/src/Day8/Puzzle1.hs b/src/Day08/Puzzle1.hs similarity index 95% rename from src/Day8/Puzzle1.hs rename to src/Day08/Puzzle1.hs index 3125efd..f8724de 100644 --- a/src/Day8/Puzzle1.hs +++ b/src/Day08/Puzzle1.hs @@ -1,4 +1,4 @@ -module Day8.Puzzle1 (day8_1) where +module Day08.Puzzle1 (day08_1) where import Control.Applicative import Data.List (uncons) @@ -36,8 +36,8 @@ getAntinodes a b maxX maxY = then [] else filter (\c -> isInside c maxX maxY) [(2 * xa - xb, 2 * ya - yb), (2 * xb - xa, 2 * yb - ya)] -day8_1 :: IO () -day8_1 = do +day08_1 :: IO () +day08_1 = do contents <- lines <$> readFile "input/day8.txt" let antennas = getAntennas contents x = length contents diff --git a/src/Day8/Puzzle2.hs b/src/Day08/Puzzle2.hs similarity index 96% rename from src/Day8/Puzzle2.hs rename to src/Day08/Puzzle2.hs index fcf86b5..bdebccc 100644 --- a/src/Day8/Puzzle2.hs +++ b/src/Day08/Puzzle2.hs @@ -1,4 +1,4 @@ -module Day8.Puzzle2 (day8_2) where +module Day08.Puzzle2 (day08_2) where import Control.Applicative import Data.Bifunctor (bimap) @@ -47,8 +47,8 @@ getAntinodes a b maxX maxY = ++ takeWhile (\c -> isInside c maxX maxY) (generateCoords (coordinates a) (distX, distY)) ++ takeWhile (\c -> isInside c maxX maxY) (generateCoords (coordinates b) (-distX, -distY)) -day8_2 :: IO () -day8_2 = do +day08_2 :: IO () +day08_2 = do contents <- lines <$> readFile "input/day8.txt" let antennas = getAntennas contents x = length contents diff --git a/src/Day9/Puzzle1.hs b/src/Day09/Puzzle1.hs similarity index 94% rename from src/Day9/Puzzle1.hs rename to src/Day09/Puzzle1.hs index ffe4a2c..da50868 100644 --- a/src/Day9/Puzzle1.hs +++ b/src/Day09/Puzzle1.hs @@ -1,4 +1,4 @@ -module Day9.Puzzle1 (day9_1) where +module Day09.Puzzle1 (day09_1) where import Control.Applicative import Data.Char (digitToInt) @@ -25,8 +25,8 @@ compact xs checksum :: [Int] -> Int checksum xs = sum $ zipWith (*) xs [0 ..] -day9_1 :: IO () -day9_1 = do +day09_1 :: IO () +day09_1 = do contents <- init <$> readFile "input/day9.txt" let diskMap = map digitToInt contents putStrLn $ diff --git a/src/Day9/Puzzle2.hs b/src/Day09/Puzzle2.hs similarity index 97% rename from src/Day9/Puzzle2.hs rename to src/Day09/Puzzle2.hs index 04d152c..0a79423 100644 --- a/src/Day9/Puzzle2.hs +++ b/src/Day09/Puzzle2.hs @@ -1,6 +1,6 @@ {-# OPTIONS_GHC -Wno-incomplete-patterns #-} -module Day9.Puzzle2 (day9_2) where +module Day09.Puzzle2 (day09_2) where import Data.Char (digitToInt) import qualified Data.Foldable as F @@ -62,8 +62,8 @@ tuplesToIntList disk = checksum :: [Int] -> Int checksum xs = sum $ zipWith (*) (maskMinus1 xs) [0 ..] -day9_2 :: IO () -day9_2 = do +day09_2 :: IO () +day09_2 = do contents <- init <$> readFile "input/day9.txt" let disk = parseDiskMap $ map digitToInt contents i = fromMaybe (-1) $ S.findIndexR (\x -> fst x /= -1) disk diff --git a/src/Main.hs b/src/Main.hs index 0685975..df203cb 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -1,23 +1,23 @@ module Main (main) where -import Day1.Puzzle1 -import Day1.Puzzle2 -import Day2.Puzzle1 -import Day2.Puzzle2 -import Day3.Puzzle1 -import Day3.Puzzle2 -import Day4.Puzzle1 -import Day4.Puzzle2 -import Day5.Puzzle1 -import Day5.Puzzle2 -import Day6.Puzzle1 -import Day6.Puzzle2 -import Day7.Puzzle1 -import Day7.Puzzle2 -import Day8.Puzzle1 -import Day8.Puzzle2 -import Day9.Puzzle1 -import Day9.Puzzle2 +import Day01.Puzzle1 +import Day01.Puzzle2 +import Day02.Puzzle1 +import Day02.Puzzle2 +import Day03.Puzzle1 +import Day03.Puzzle2 +import Day04.Puzzle1 +import Day04.Puzzle2 +import Day05.Puzzle1 +import Day05.Puzzle2 +import Day06.Puzzle1 +import Day06.Puzzle2 +import Day07.Puzzle1 +import Day07.Puzzle2 +import Day08.Puzzle1 +import Day08.Puzzle2 +import Day09.Puzzle1 +import Day09.Puzzle2 import Day10.Puzzle1 import Day11.Puzzle1 import Day11.Puzzle2 @@ -30,32 +30,32 @@ import System.Environment (getArgs) main :: IO () main = do - args <- getArgs - case args of - "1":"1":_ -> day1_1 - "1":"2":_ -> day1_2 - "2":"1":_ -> day2_1 - "2":"2":_ -> day2_2 - "3":"1":_ -> day3_1 - "3":"2":_ -> day3_2 - "4":"1":_ -> day4_1 - "4":"2":_ -> day4_2 - "5":"1":_ -> day5_1 - "5":"2":_ -> day5_2 - "6":"1":_ -> day6_1 - "6":"2":_ -> day6_2 - "7":"1":_ -> day7_1 - "7":"2":_ -> day7_2 - "8":"1":_ -> day8_1 - "8":"2":_ -> day8_2 - "9":"1":_ -> day9_1 - "9":"2":_ -> day9_2 - "10":"1":_ -> day10_1 - "11":"1":_ -> day11_1 - "11":"2":_ -> day11_2 - "12":"1":_ -> day12_1 - "13":"1":_ -> day13_1 - "13":"2":_ -> day13_2 - "14":"1":_ -> day14_1 - "15":"1":_ -> day15_1 - _ -> error "Not implemented" + args <- getArgs + case args of + "1" : "1" : _ -> day01_1 + "1" : "2" : _ -> day01_2 + "2" : "1" : _ -> day02_1 + "2" : "2" : _ -> day02_2 + "3" : "1" : _ -> day03_1 + "3" : "2" : _ -> day03_2 + "4" : "1" : _ -> day04_1 + "4" : "2" : _ -> day04_2 + "5" : "1" : _ -> day05_1 + "5" : "2" : _ -> day05_2 + "6" : "1" : _ -> day06_1 + "6" : "2" : _ -> day06_2 + "7" : "1" : _ -> day07_1 + "7" : "2" : _ -> day07_2 + "8" : "1" : _ -> day08_1 + "8" : "2" : _ -> day08_2 + "9" : "1" : _ -> day09_1 + "9" : "2" : _ -> day09_2 + "10" : "1" : _ -> day10_1 + "11" : "1" : _ -> day11_1 + "11" : "2" : _ -> day11_2 + "12" : "1" : _ -> day12_1 + "13" : "1" : _ -> day13_1 + "13" : "2" : _ -> day13_2 + "14" : "1" : _ -> day14_1 + "15" : "1" : _ -> day15_1 + _ -> error "Not implemented"