From 12cf73eb256d69a65b3af5246629ef596a23ddd7 Mon Sep 17 00:00:00 2001 From: Zubin Duggal Date: Tue, 17 Jun 2025 15:29:50 +0530 Subject: [PATCH] Initialize name cache with known keys to prevent confusion with built in names (GHC #26055) --- src/HieDb/Utils.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/HieDb/Utils.hs b/src/HieDb/Utils.hs index c57ec12..7c8083c 100644 --- a/src/HieDb/Utils.hs +++ b/src/HieDb/Utils.hs @@ -42,6 +42,7 @@ import qualified Data.IntMap.Strict as IMap import Data.IntMap.Strict (IntMap) import Data.IntSet (IntSet) import Control.Monad (guard, unless) +import GHC.Builtin.Utils #if __GLASGOW_HASKELL__ >= 903 import Control.Concurrent.MVar (readMVar) @@ -94,10 +95,10 @@ addTypeRef (getConn -> conn) hf arr ixs sp = go 0 makeNc :: IO NameCache makeNc = do #if __GLASGOW_HASKELL__ >= 903 - initNameCache 'z' [] + initNameCache 'z' knownKeyNames #else uniq_supply <- mkSplitUniqSupply 'z' - return $ initNameCache uniq_supply [] + return $ initNameCache uniq_supply knownKeyNames #endif -- | Recursively search for @.hie@ and @.hie-boot@ files in given directory