diff --git a/haskell/Main.hs b/haskell/Main.hs index 80c2d48..47adfa7 100644 --- a/haskell/Main.hs +++ b/haskell/Main.hs @@ -7,6 +7,7 @@ import Data.Text.IO qualified as T import Puzzle import Puzzles.Day1 qualified as Day1 import Puzzles.Day2 qualified as Day2 +import Puzzles.Day3 qualified as Day3 import Test.Tasty import Test.Tasty.Golden (goldenVsString) import Test.Tasty.Ingredients.ConsoleReporter @@ -21,6 +22,7 @@ main = testGroup t $ [ Day1.puzzle , Day2.puzzle + , Day3.puzzle ] <&> \Puzzle{number, parser, parts} -> let diff --git a/haskell/Puzzles/Day3.hs b/haskell/Puzzles/Day3.hs new file mode 100644 index 0000000..38a49a8 --- /dev/null +++ b/haskell/Puzzles/Day3.hs @@ -0,0 +1,13 @@ +module Puzzles.Day3 (puzzle) where + +import Puzzle + +puzzle :: Puzzle +puzzle = + Puzzle + { number = 3 + , parser = _ + , parts = + [ _ + ] + } diff --git a/haskell/aoc.cabal b/haskell/aoc.cabal index 9b3f18e..a21aed9 100644 --- a/haskell/aoc.cabal +++ b/haskell/aoc.cabal @@ -12,6 +12,7 @@ executable aoc Puzzle Puzzles.Day1 Puzzles.Day2 + Puzzles.Day3 default-language: GHC2024 default-extensions: BlockArguments diff --git a/inputs/examples/3 b/inputs/examples/3 new file mode 100644 index 0000000..7255fca --- /dev/null +++ b/inputs/examples/3 @@ -0,0 +1,4 @@ +987654321111111 +811111111111119 +234234234234278 +818181911112111 diff --git a/inputs/private b/inputs/private index 6de81f9..69a0d6c 160000 --- a/inputs/private +++ b/inputs/private @@ -1 +1 @@ -Subproject commit 6de81f9ec54f2f5ecdfec98ab4e8a46e0bc76b0f +Subproject commit 69a0d6cdd7aa47dedb9b6653a27bd5e717d766fb diff --git a/outputs/examples/3/1 b/outputs/examples/3/1 new file mode 100644 index 0000000..2a9c18a --- /dev/null +++ b/outputs/examples/3/1 @@ -0,0 +1 @@ +357 \ No newline at end of file