summaryrefslogtreecommitdiff
path: root/compiler/GHC/Stg
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2021-10-11 14:58:46 +0200
committerBen Gamari <ben@well-typed.com>2021-10-13 01:07:45 +0000
commit0aae1b4e7bc7398ea1ef6ed3084dfabf9cf80ce3 (patch)
treef99f87fcc176c66cbc7dbc53c6ed38b376dabc72 /compiler/GHC/Stg
parent4cf43b2a1d569a786e549962e867eb506f4fc76a (diff)
downloadhaskell-0aae1b4e7bc7398ea1ef6ed3084dfabf9cf80ce3.tar.gz
shadowNames: Accept an OccName, not a GreName
previously, the `shadowNames` function would take `[GreName]`. This has confused me for two reasons: * Why `GreName` and not `Name`? Does the difference between a normal name and a field name matter? The code of `shadowNames` shows that it does not, but really its better if the type signatures says so. * Why `Name` and not `OccName`? The point of `shadowNames` is to shadow _unqualified names_, at least in the two use cases I am aware of (names defined on the GHCI prompt or in TH splices). The code of `shadowNames` used to have cases that peek at the module of the given name and do something if that module appears in the `GlobalRdrElt`, but I think these cases are dead code, I don’t see how they could occur in the above use cases. Also, I replaced them with `errors` and GHC would still validate. Hence removing this code (yay!) This change also allows `shadowNames` to accept an `OccSet` instead, which allows for a faster implemenation; I’ll try that separately. This in stead might help with !6703.
Diffstat (limited to 'compiler/GHC/Stg')
0 files changed, 0 insertions, 0 deletions