You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: include the field selector when looking for missing symbol
In GHC >= 9.8, the namespace for record selector changed and is now part
of a new namespace. This allows for duplicated record field names in the
same module.
This hence generated a few issues in HLS when looking for a symbol using
`lookupOccEnv`: the current implementation was only doing lookup in
type, data and var namespaces.
This commit uses `lookupOccEnv_AllNameSpaces`, so it may be more
efficient (one lookup instead of two), but it also incluse the symbols
from record field selectors and this will actually fix most import
suggestion logic when a record field selector is not found.
Note that the function is not available in `ghc` <= 9.6, hence the `CPP`
and fallsback implementation, which uses the previous implementation.
See https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/9.8#new-namespace-for-record-fields
0 commit comments