Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TyVar BndrVis #2622

Merged
merged 1 commit into from
Dec 20, 2024
Merged

Fix TyVar BndrVis #2622

merged 1 commit into from
Dec 20, 2024

Conversation

TeofilC
Copy link
Contributor

@TeofilC TeofilC commented Dec 16, 2024

#2542 allowed dhall to compile with template-haskell-2.21 and GHC-9.8 by adapting to the addition of a binder visibility field on type variables.

Previously all binders were taken to be required, but in GHC-9.8 the possibility of invisible binders was introduced.

The above patch mistakenly set all binders generated by Dhall to be invisible, rather than default value of required. This changes the semantics of the code and broke some examples in the test suite.

This patch fixes this by correctly setting binders to be BndrReq.

Resolves #2567

dhall-lang#2542 allowed `dhall`
to compile with template-haskell-2.21 and GHC-9.8 by adapting to the
addition of a binder visibility field on type variables.

Previously all binders were taken to be required, but in GHC-9.8 the
possibility of invisible binders was introduced.

The above patch mistakenly set all binders generated by Dhall to be
invisible, rather than default value of required. This changes the
semantics of the code and broke some examples in the test suite.

This patch fixes this by correctly setting binders to be BndrReq.

Resolves dhall-lang#2567
@TeofilC
Copy link
Contributor Author

TeofilC commented Dec 16, 2024

You should also consider whether it's worth deprecating versions of dhall between this bug being introduced and fixed as users using the TH functions with GHC 9.8+ will have generated broken code. Or maybe just releasing revisions that disable the broken combination of dhall and template-haskell.

@ysangkok
Copy link
Contributor

This is great, thank you! Tagging @Gabriella439, not sure if you're subscribed.

@Gabriella439 Gabriella439 merged commit 3cf9506 into dhall-lang:main Dec 20, 2024
9 checks passed
@Gabriella439
Copy link
Collaborator

I am subscribed! I receive email notifications for PRs opened against this repository

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.

Build failure on GHC 9.8.1: 'Illegal invisible type variable binder'
3 participants