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

promoteLetDecName: Fix visibility-related bug #586

Merged
merged 2 commits into from
May 4, 2024
Merged

promoteLetDecName: Fix visibility-related bug #586

merged 2 commits into from
May 4, 2024

Conversation

RyanGlScott
Copy link
Collaborator

Previously, promoteLetDecName would convert every DTyVarBndrSpec in an outermost forall to an invisible argument in a promoted type family equation. This is not quite right, however, as #585 reveals: we do not want to convert inferred type variable binders to invisible arguments.

To do this properly, we introduce a new tvbSpecsToBndrVis function, which converts a list of DTyVarBndrSpecs to a list of DTyVarBndrVises, dropping any DTyVarBndrSpecs with an InferredSpec in the process. We then use tvbSpecsToBndrVis in promoteLetDecName, which neatly fixes #585.

This is needed to bring in a fix for
goldfirere/th-desugar#212, which we will use in a
subsequent commit.
Previously, `promoteLetDecName` would convert every `DTyVarBndrSpec` in an
outermost `forall` to an invisible argument in a promoted type family equation.
This is not quite right, however, as #585 reveals: we do not want to convert
_inferred_ type variable binders to invisible arguments.

To do this properly, we introduce a new `tvbSpecsToBndrVis` function, which
converts a list of `DTyVarBndrSpec`s to a list of `DTyVarBndrVis`es, dropping
any `DTyVarBndrSpec`s with an `InferredSpec` in the process. We then use
`tvbSpecsToBndrVis` in `promoteLetDecName`, which neatly fixes #585.
@RyanGlScott RyanGlScott merged commit aad81c8 into master May 4, 2024
24 checks passed
@RyanGlScott RyanGlScott deleted the T585 branch May 4, 2024 10:57
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.

singletons-th-3.3 regression involving inferred type variable binders
1 participant