Skip to content

Commit 12cf73e

Browse files
committed
Initialize name cache with known keys to prevent confusion with built in names (GHC #26055)
1 parent 378a339 commit 12cf73e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/HieDb/Utils.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import qualified Data.IntMap.Strict as IMap
4242
import Data.IntMap.Strict (IntMap)
4343
import Data.IntSet (IntSet)
4444
import Control.Monad (guard, unless)
45+
import GHC.Builtin.Utils
4546

4647
#if __GLASGOW_HASKELL__ >= 903
4748
import Control.Concurrent.MVar (readMVar)
@@ -94,10 +95,10 @@ addTypeRef (getConn -> conn) hf arr ixs sp = go 0
9495
makeNc :: IO NameCache
9596
makeNc = do
9697
#if __GLASGOW_HASKELL__ >= 903
97-
initNameCache 'z' []
98+
initNameCache 'z' knownKeyNames
9899
#else
99100
uniq_supply <- mkSplitUniqSupply 'z'
100-
return $ initNameCache uniq_supply []
101+
return $ initNameCache uniq_supply knownKeyNames
101102
#endif
102103

103104
-- | Recursively search for @.hie@ and @.hie-boot@ files in given directory

0 commit comments

Comments
 (0)