Skip to content

Inlay hints for unmatched patterns on wild cards. #4569

Open
@MangoIV

Description

@MangoIV

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions