Skip to content

Fix TyVar BndrVis#2622

Merged
Gabriella439 merged 1 commit intodhall-lang:mainfrom
TeofilC:teo/fix-bindr-vis
Dec 20, 2024
Merged

Fix TyVar BndrVis#2622
Gabriella439 merged 1 commit intodhall-lang:mainfrom
TeofilC:teo/fix-bindr-vis

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
@Gabriella439
Copy link
Collaborator

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

@ysangkok
Copy link
Contributor

Submitted

to get dhall-1.42.2 added to the current Stackage LTS for GHC 9.8. That includes this patch

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