Simon Hengel pushed to branch wip/sol/hie-wierd-in-as-external at Glasgow Haskell Compiler / GHC
Commits:
-
b6c99ef9
by Simon Hengel at 2025-08-06T18:10:29+07:00
2 changed files:
Changes:
... | ... | @@ -285,10 +285,11 @@ fromHieName :: NameCache -> HieName -> IO Name |
285 | 285 | fromHieName nc hie_name = do
|
286 | 286 | |
287 | 287 | case hie_name of
|
288 | - ExternalName mod occ _ | Just name <- isKnownOrigName_maybe mod occ -> return name
|
|
289 | - |
|
290 | 288 | ExternalName mod occ span -> updateNameCache nc mod occ $ \cache -> do
|
291 | 289 | case lookupOrigNameCache cache mod occ of
|
290 | + -- Note that this may be a wired-in name (provided that the NameCache
|
|
291 | + -- was initialized with know-key names, which is always the case if you
|
|
292 | + -- use `newNameCache`).
|
|
292 | 293 | Just name -> pure (cache, name)
|
293 | 294 | Nothing -> do
|
294 | 295 | uniq <- takeUniqFromNameCache nc
|
... | ... | @@ -229,10 +229,7 @@ writeInterfaceFile filename iface = do |
229 | 229 | return ()
|
230 | 230 | |
231 | 231 | freshNameCache :: IO NameCache
|
232 | -freshNameCache =
|
|
233 | - initNameCache
|
|
234 | - 'a' -- ??
|
|
235 | - []
|
|
232 | +freshNameCache = newNameCache
|
|
236 | 233 | |
237 | 234 | -- | Read a Haddock (@.haddock@) interface file. Return either an
|
238 | 235 | -- 'InterfaceFile' or an error message.
|