When name resolution falls back to the type-level, term-level alternatives should still be suggested
In previous versions (I'm using 8.10 here), you can have the following GHCi session:
ghci> int = 24
ghci> [Int]
<interactive>:3:2: error:
• Data constructor not in scope: Int
• Perhaps you meant variable ‘int’ (line 1)
The compiler helpfully tells me that I may have misspelled a variable that's in scope. However, with #18740 (closed) fixed, we get
ghci> int = 24
ghci> [Int]
<interactive>:5:2: error:
* Illegal term-level use of the type constructor `Int'
imported from `Prelude' (and originally defined in `GHC.Types')
While it's nice to know that a type constructor with that name is in scope, the helpful suggestion is now gone.
The suggestion should still appear below the error message, as before.
Unless someone else wishes to take this up before I get around to it, I can take care of this in a bit, since it uses the same mechanisms as my MR !5763 (closed).