Issue #23614: GHCi spelling suggestions during :info
Responding to #23614
Suppose there is a variable misspelled == 100
in scope. Previously, :t misspelld
would suggest the corrected spelling, but :i misspelld
would not in GHCi. This MR attempts to add this feature to the :i
command.
The key part of this patch is to make both compiler/GHC/Rename/Env.hs
and compiler/GHC/Tc/Module.hs
depend on code in compiler/GHC/Rename/Unbound.hs
for the purpose of finding misspelled names. This is through the similarNameSuggestionsM
function that latter module now exports.
-
if your MR may break existing programs (e.g. touches base
or causes the compiler to reject programs), please describe the expected breakage and add the user-facing label. This will run ghc/head.hackage> to characterise the effect of your change on Hackage. -
ensure that your commits are either individually buildable or squashed -
ensure that your commit messages describe what they do (referring to tickets using #NNNN
syntax when appropriate) -
have added source comments describing your change. For larger changes you likely should add a [Note][notes] and cross-reference it from the relevant places. -
add a [testcase to the testsuite][adding test]. -
updates the users guide if applicable -
mentions new features in the release notes for the next release