hlint icon indicating copy to clipboard operation
hlint copied to clipboard

Not to suggest hints if there are holes in the current code

Open Lev135 opened this issue 1 year ago • 1 comments

When I leave a hole in my code this means that I'm working on it and in most cases don't want to refactor it at the same time. So hints doesn't help me in this situation, but only distract from the problem I'm working on. A typical example is when I start to write a lambda and want to know which type it should return: I write ... \_ -> _ and hlint immediatly offers me to use const _. This hint make no sense and even make things worse: in VsCode hint appears before type hole's error message and I have to scroll it to see what I really need.

Since in finished code there should be no holes and hlint suggestions doesn't make any sense until you complete the region it refers to, I propose not display these hints. More precisely: if there's a hole in the area to which hlint suggests to apply a hint, hide it. I think it should be easy to implement.

Maybe this is already implemented and I just need to enable some option enable this behavior? However, even if it's so, I'd argue that it should be enabled by default.

Lev135 avatar Jun 11 '23 08:06 Lev135