Refactor thRdrNameGuesses to account for record field namespaces
Currently, thRdrNameGuesses
returns a list of possible RdrName
s that a TH.Name
could refer to. However, now that there are an infinite number of possible namespaces with the introduction of record field namespaces, we should instead return a predicate that tells us which namespaces we should be allowed to look into when looking it up (see lookupThName_maybe
and thNameToGhcNameIO
). This would allow us to be a bit more robust in cases like #23376 (closed) in which one looks up a record field using the variable namespace instead of the record field namespace.