Term variable capture (#23740)
See #23740 (closed) for context.
Overview:
-
Main change: Demotion of unqualified variable names in
lookupTypeOccRn
. See the newNote [Demotion of unqualified variables]
. - Update
notFound
andtcTyVar
to reportTermVariablePE
errors. - Extend
filterInScopeM
to look up in the global rdr env. Use itfilterInScopeM
(or its new siblingfilterInScopeNonClassM
) in two new places. - Update error message for
TcRnCapturedTermName
.
The test cases T23740{a,b,c,d,e,f,g,h,i}
mirror the corresponding T22513*
cases.