Open michaelpj opened 5 months ago
I guess once we move to the full structured diagnostic infrastructure we'll be able to use the more sophisticated printing options, but for now just using the user-facing flag will help.
@michaelpj I finally created a PR that uses correctly -fno-show-error-context
, as per screenshots in the PR description.
That said, after introducing the change, I realised that some specs are broken, and I have verified in Visual Studio Code that the Code Action replace _ with xxxx
changes slightly the behaviour when using the new option.
For comparison, before the change:
After the change:
So in the particular example above, when selecting replace _ with const
, after the change the `` wrapping the hole are lost.
Any advice?
That's extremely weird. I guess we need to look a the code that is coming up with that information and check what it is doing?
Since 9.8 (https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8563) GHC has had the
-fno-show-error-context
flag, which makes GHC omit a bunch of contextual information that isn't really useful if you are directly showing the user the location of the error. That's exactly the situation we are in, we should use it!