Closed
Description
Is your enhancement request related to a problem? Please describe.
With code
f = let x = Doesn'tExist
in undefined
when I execute code action on Doesn'tExist
, HLS (haskell-language-server version: 2.9.0.0 (GHC: 9.6.6)) adds {-# OPTIONS_GHC -Wno-deferred-out-of-scope-variables #-}
on the top of my file. It does this, I believe, because this is the only code action available. I don't think this is the solution that user wants in most cases. At least in Emacs it is easy to miss that HLS did that (if only one action is available, it is executed), leading to confusion on as to why, suddenly, HLS "doesn't work". It works, of course, because with that flag there is no longer a compile time error.
Describe the solution you'd like
Don't suggest {-# OPTIONS_GHC -Wno-deferred-out-of-scope-variables #-}
.
Describe alternatives you've considered
Restarting HLS... a lot :) I don't think there is an alternative.