From b19c02811e1047f9a5ca0f69b5866f5f6ddb8ab8 Mon Sep 17 00:00:00 2001 From: George Thomas Date: Tue, 2 Dec 2025 11:20:48 +0000 Subject: [PATCH] Refactor to use field puns --- aoc.cabal | 1 + app/Main.hs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/aoc.cabal b/aoc.cabal index b8cf1d4..5dd464e 100644 --- a/aoc.cabal +++ b/aoc.cabal @@ -13,6 +13,7 @@ executable aoc BlockArguments DuplicateRecordFields MultiWayIf + NamedFieldPuns NoFieldSelectors OverloadedRecordDot OverloadedStrings diff --git a/app/Main.hs b/app/Main.hs index 25f088f..5421be8 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -29,7 +29,7 @@ main = ] puzzleTest :: Puzzle a -> TestTree -puzzleTest Puzzle{..} = +puzzleTest Puzzle{number, parser, parts} = testGroup pt $ ["examples", "real"] <&> \t -> withResource (parseFile $ "inputs/" <> t <> "/" <> pt) mempty \input ->