The NameCache makes sure that there is just one Unique assigned for each original name; i.e. (module-name, occ-name) pair and provides something of a lookup mechanism for those names.
Moduleghc-9.10.3GHC2021
GHC.Types.Name.Cache
The Name Cache
- 2 types
- 7 values
- Packageghc-9.10.3
- Exports9
- LanguageGHC2021
- LicenceBSD-3-Clause
- SourceCache.hs
Update the name cache with the given function
Update the name cache with the given function
Additionally, it ensures that the given Module and OccName are evaluated. If not, chaos can ensue: we read the name-cache then pull on mod (say) which does some stuff that modifies the name cache This did happen, with tycon_mod in GHC.IfaceToCore.tcIfaceAlt (DataAlt..)