Skip to content

Inlay hints for unmatched patterns on wild cards. #4569

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

Open
MangoIV opened this issue Apr 23, 2025 · 0 comments
Open

Inlay hints for unmatched patterns on wild cards. #4569

MangoIV opened this issue Apr 23, 2025 · 0 comments
Labels
type: enhancement New feature or request

Comments

@MangoIV
Copy link
Contributor

MangoIV commented Apr 23, 2025

Is your enhancement request related to a problem? Please describe.

say I have a function

data X = A | B | C | D 

f :: X -> X -> Bool 
f A A = True 
f _ _ = False

Then sometimes it is not obvious, what kind patterns are subsumed by the wildcards.

Describe the solution you'd like

What would be really cool would be to have HLS show the patterns that haven't been matched as inlay hint on the wildcards.

This would be similar to what the warning shows when just omitting the cases.

Describe alternatives you've considered

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants