Skip to content

Do not use field selector in makeWorld#139

Merged
dpwiz merged 2 commits intojonascarpay:masterfrom
Shimuuar:makeWorld-no-field-selector
Oct 2, 2025
Merged

Do not use field selector in makeWorld#139
dpwiz merged 2 commits intojonascarpay:masterfrom
Shimuuar:makeWorld-no-field-selector

Conversation

@Shimuuar
Copy link
Contributor

@Shimuuar Shimuuar commented Sep 6, 2025

When NoFieldSelectors is active selectors are not generated and using makeWorld results in compilation error. This PR replaces field selectors with handwritten accessors and switch world's constructor from record to normal constructor.

I took liberty to rewrite TH to use quasiquotes extensively

Fixes #137

 - Switch generate data type to normal constructor instead of record
 - Use handwritten accessor instead

This means generated code will work with NoFieldSelectors on. Fixes jonascarpay#137
@dpwiz dpwiz merged commit 739f8a8 into jonascarpay:master Oct 2, 2025
14 of 19 checks passed
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.

makeWorld fails if NoFieldSelectors is enabled

2 participants