Skip to content

adjust generator#102

Merged
oxe-i merged 1 commit intoexercism:mainfrom
oxe-i:adjustGenerator
Feb 6, 2026
Merged

adjust generator#102
oxe-i merged 1 commit intoexercism:mainfrom
oxe-i:adjustGenerator

Conversation

@oxe-i
Copy link
Contributor

@oxe-i oxe-i commented Feb 6, 2026

Changes:

  1. Replace all occurrences of import Lean with import Lean.Data.Json. Generation of test files is more than 10s faster now.
  2. Create 2 helper functions in Helper.lean, to serialize lists and objects as lists. They take a json, a serializing function for each item and a separator to insert between items.
  3. Add a generator for dominoes. It returns a test file exactly equal to the one already there.
  4. Change the generators for house and relative-distance, to make use of newly inserted helpers and improve readability of their test files.

Given that the structure of the test files is the same, I "hardcoded" a standard indent, similar to the one used in dominoes. If we need another format, I can add an extra parameter to those helper functions.

I'll add diamond next to test the new functions further.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested.

If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos.

[no important files changed]

For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you!

@oxe-i oxe-i merged commit a3cfa63 into exercism:main Feb 6, 2026
7 checks passed
@oxe-i oxe-i deleted the adjustGenerator branch February 6, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants