
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 Rely on knownKeysOrigNameCache - - - - - 2 changed files: - compiler/GHC/Iface/Ext/Binary.hs - utils/haddock/haddock-api/src/Haddock/InterfaceFile.hs Changes: ===================================== compiler/GHC/Iface/Ext/Binary.hs ===================================== @@ -285,10 +285,11 @@ fromHieName :: NameCache -> HieName -> IO Name fromHieName nc hie_name = do case hie_name of - ExternalName mod occ _ | Just name <- isKnownOrigName_maybe mod occ -> return name - ExternalName mod occ span -> updateNameCache nc mod occ $ \cache -> do case lookupOrigNameCache cache mod occ of + -- Note that this may be a wired-in name (provided that the NameCache + -- was initialized with know-key names, which is always the case if you + -- use `newNameCache`). Just name -> pure (cache, name) Nothing -> do uniq <- takeUniqFromNameCache nc ===================================== utils/haddock/haddock-api/src/Haddock/InterfaceFile.hs ===================================== @@ -229,10 +229,7 @@ writeInterfaceFile filename iface = do return () freshNameCache :: IO NameCache -freshNameCache = - initNameCache - 'a' -- ?? - [] +freshNameCache = newNameCache -- | Read a Haddock (@.haddock@) interface file. Return either an -- 'InterfaceFile' or an error message. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b6c99ef9a275e52975708976bf0123ca... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b6c99ef9a275e52975708976bf0123ca... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Simon Hengel (@sol)