Tidy up main

This commit is contained in:
George Thomas 2026-01-06 18:48:37 +00:00
parent db41a65453
commit ecb7391468

View File

@ -18,23 +18,26 @@ import Puzzles.Day9 qualified as Day9
import Text.Pretty.Simple (pPrintForceColor) import Text.Pretty.Simple (pPrintForceColor)
main :: IO () main :: IO ()
main = main = do
(pPrintForceColor =<<) $ runTests () $ test "tests" pure $ flip map enumerate \isRealData@(bool "examples" "real" -> t) -> pPrintForceColor $ getTestTree tests
test (mkTestName t) pure $ flip pPrintForceColor =<< runTests () tests
map
[ Day1.puzzle tests :: TestTree IO ()
, Day2.puzzle tests =
, Day3.puzzle test "tests" pure $
, Day4.puzzle enumerate <&> \isRealData@(bool "examples" "real" -> t) ->
, Day5.puzzle test (mkTestName t) pure $
, Day6.puzzle [ Day1.puzzle
, Day7.puzzle , Day2.puzzle
, Day8.puzzle , Day3.puzzle
, Day9.puzzle , Day4.puzzle
, Day10.puzzle , Day5.puzzle
] , Day6.puzzle
\Puzzle{number = show -> pt, parser, parts, extraTests} -> , Day7.puzzle
testLazy , Day8.puzzle
, Day9.puzzle
, Day10.puzzle
] <&> \Puzzle{number = show -> pt, parser, parts, extraTests} -> testLazy
(mkTestName pt) (mkTestName pt)
( \() -> do ( \() -> do
let fp = "../inputs/" <> t <> "/" <> pt let fp = "../inputs/" <> t <> "/" <> pt