Main.hs (438B)
1 module Main where 2 3 import Text.Printf (printf) 4 5 import Solutions (solutions, SolType) 6 7 runSolutions :: [(Integer, IO (SolType, SolType))] -> IO () 8 runSolutions ((num, fun) : sols) = do 9 printf "Running day %d:\n" num 10 (sol1, sol2) <- fun 11 printf "Solution for part 1: %s\n" (show sol1) 12 printf "Solution for part 2: %s\n" (show sol2) 13 runSolutions sols 14 runSolutions [] = putStrLn "Done!" 15 16 main :: IO () 17 main = runSolutions solutions