haskell / haskell/error-messages
Better suggestion for data constructors import list
- Dominant language
- No language data
- Stars
- 76
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
Here's an error message:
```
Data constructor not in scope:
NonRec :: Id -> GHC.Core.CoreExpr -> GHC.Core.Bind b0
Suggested fix:
• Perhaps you want to add ‘NonRec’ to the import list
in the import of ‘GHC.Core’
```
So I add `import GHC.Core (NonRec)` and I get:
```
In module ‘GHC.Core’:
‘NonRec’ is a data constructor of ‘Bind’
To import it use
import GHC.Core( Bind( NonRec ) )
or
import GHC.Core( Bind(..) )
```
The first error should suggest adding `Bind (NonRec)` directly.
The second error is good. Minor nitpick: it could use the "Suggested fix" header.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.