Inlay hints for unmatched patterns on wild cards.
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
What would that look like? There could be many unmatched combinations of patterns, how would we actually display that?
GHC already has a way to show which patterns are missing. I would just show those?
Can you write out how that would look? Remember this gets put into the user's buffer if it's an inlay hint.
data Foo = Bar | Baz | Qux
foo = \case
Foo -> ..
_ Baz, Qux -> .. -- where Bax, Qux would be in inline hint highlighting style
I think it's similar to how inlay hints for record wildcards currently work.
I guess one issue is that GHC already does a bit "too much" in that if you have a definition like the above, it tries to be clever about the second underscore, i.e. it considers them together and then even reduces the amount of possibilities, I think in this case you just wanna show all options that weren't already missed by previous patterns