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

Bugfix: Explicit record fields inlay hints for polymorphic records #4510

Merged
merged 3 commits into from
Mar 24, 2025

Conversation

wczyz
Copy link
Contributor

@wczyz wczyz commented Mar 3, 2025

After type checking, expressions in the application of polymorphic records are wrapped in WrapExpr, which does not happen in the case of regular records

HsApp _ _ (XExpr (WrapExpr (HsWrap _ (XExpr (ConLikeTc ...

vs

HsApp _ _ (XExpr (ConLikeTc ...

Fixes #4475

@wczyz wczyz marked this pull request as ready for review March 3, 2025 09:09
@wczyz wczyz requested a review from ozkutuk as a code owner March 3, 2025 09:09
@wczyz wczyz changed the title Explicit record fields inlay hints for polymorphic records Bugfix: Explicit record fields inlay hints for polymorphic records Mar 3, 2025
@fendor fendor self-requested a review March 5, 2025 13:16
@fendor fendor added the status: needs review This PR is ready for review label Mar 5, 2025
@guibou
Copy link
Collaborator

guibou commented Mar 12, 2025

As the original author of the linked issues, #4475, I can confirm that I tested and it fixs the problem. Tested with ghc 9.10.

image

@guibou
Copy link
Collaborator

guibou commented Mar 12, 2025

Works also with pattern:

image

@fendor fendor removed the status: needs review This PR is ready for review label Mar 12, 2025
@fendor fendor enabled auto-merge (squash) March 12, 2025 11:10
@fendor fendor disabled auto-merge March 24, 2025 13:33
@fendor fendor merged commit d22ba1f into haskell:master Mar 24, 2025
37 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.

Polymorphic record does not get inlay hint
3 participants