Solve 2023-05

This commit is contained in:
Alexander Kobjolke 2023-12-07 22:21:10 +01:00
parent a29eedb4ce
commit 0a5cf30889
5 changed files with 87 additions and 2 deletions

View file

@ -4,7 +4,9 @@ module Main (main) where
import System.Process (callProcess)
doctest :: IO ()
doctest = callProcess "cabal" ["repl", "--with-ghc=doctest"]
doctest = do
args <- ("--ghc-option=" ++) <<$>> getArgs
callProcess "cabal" $ ["repl", "--with-ghc=doctest"] <> args
main :: IO ()
main = doctest

View file

@ -20,3 +20,7 @@ spec = do
describe "Day 4" do
it "calculates correctly" do
runAoC Y2023 D04 `shouldReturn` Right [24542, 8736438]
describe "Day 5" do
it "calculates the example correctly" do
runAoCExample Y2023 D05 `shouldReturn` Right [35]