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
Add import suggestion for indirect overloaded record dot
For example, the following code `foo.titi` when the type of `foo` (e.g.
`Bar` here is not in scope and not from an already imported module (e.g.
the type exists indirectly because here `foo :: Bar` comes from another module).
If the module which contains `Bar` is already imported, GHC already
gives an hint to add `titi` to the `import Bar` line and this is already
correctly handled by HLS.
```
No instance for ‘HasField "titi" Bar.Bar String’
arising from selecting the field ‘titi’
```
before =T.unlines ["{-# LANGUAGE OverloadedRecordDot #-}", "module A where", if qualifiedGhcRecords then""else"import GHC.Records", "import C (bar)", "spam = bar.foo"]
1894
+
after =T.unlines ["{-# LANGUAGE OverloadedRecordDot #-}", "module A where", if qualifiedGhcRecords then""else"import GHC.Records", "import C (bar)", "import B (Foo(..))", "spam = bar.foo"]
0 commit comments