Open ArturGajowy opened 1 year ago
I think at the moment this is just handled by our generic handling of GHC diagnostics, so we just use the primary location given by the diagnostic.
This would be much easier once we start getting structured diagnostics from GHC, otherwise we'd need to do some special-casing here.
Ideally we'd use the relatedInformation
field on Diagnostic
for this.
HLS (vscode) only highlights the first occurrence of duplicate identifiers, which - at first glance - looks like 'no errors'. Then like 'HLS dead?', and then I realize the squiggly I'm looking for is far up in the file I'm editing. There is information in GHC's error message to highlight both/all occurences.
HLS error message
Inspecting the messages to check for
Multiple declarations of
prefix and issuing diagnostics at all relevant lines would be ideal.