16 Commits

Author SHA1 Message Date
George Thomas
5b24dc1238 Format 2025-12-30 12:03:38 +00:00
George Thomas
2cd2341673 Share frame generation to avoid accidental quadratic complexity
Previously each test was computing all frames from scratch.
2025-12-30 12:03:21 +00:00
George Thomas
415055dcc2 Allow output types to vary for different parts of same day
For now this applies to Haskell only, and it may turn out to be tricky for the Rust implementation.

In practice, the limitation hasn't turned out to be important, and we could even go the other way and use `Integer` everywhere. This does however at least help with debugging, as well as just being conceptually right.

The `nil` and `(/\)` functions are intended to be overloaded to work for other list-like things in a later commit, and from there we will investigate using `OverloadedLists` and `RebindableSyntax` to recover standard list syntax, although there are probably limitations due to `(:)` being special.
2025-12-16 16:15:11 +00:00
George Thomas
57c1613019 Move output showing to main entry point 2025-12-09 16:57:05 +00:00
George Thomas
6e851d63f0 Show diff for golden test failures 2025-12-09 16:47:12 +00:00
George Thomas
ea64a5af3e Consistently use separator parsing combinators in infix form 2025-12-08 23:44:43 +00:00
George Thomas
d0488726a0 Add argument to parser for disambiguating real data versus examples
This breaks less code than adding it to the solution functions, and is more elegant in a way.
2025-12-08 22:59:50 +00:00
George Thomas
371bddf748 Use custom prelude 2025-12-08 12:48:49 +00:00
George Thomas
7ba96ee3e5 Shorten test name for cleaner CLI output 2025-12-05 13:49:04 +00:00
George Thomas
ef342a1483 Refactor day 4 and add extra tests 2025-12-05 12:09:49 +00:00
George Thomas
be0a6510d8 Use lazy text for test outputs
Simplifies encoding code slightly, and potentially saves a lot of time for failing tests. Plus we've always been using `T.show` in practice anyway, so it's an easy change to make.
2025-12-04 21:24:49 +00:00
George Thomas
f91824a6a9 Add some useful inputs to extraTests 2025-12-04 21:17:50 +00:00
George Thomas
8f67916e1a Add way to specify extra tests 2025-12-04 21:17:50 +00:00
George Thomas
0508947a65 Solve day 4 part 2 2025-12-04 20:00:53 +00:00
George Thomas
9137e7cd66 Solve day 4 part 1 2025-12-04 18:02:57 +00:00
George Thomas
0844d4af2f Initialise day 4 2025-12-04 10:00:15 +00:00