diff options
Diffstat (limited to 'compiler/main/HscMain.hs')
-rw-r--r-- | compiler/main/HscMain.hs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/compiler/main/HscMain.hs b/compiler/main/HscMain.hs index 64143e0c03..95cb5f222f 100644 --- a/compiler/main/HscMain.hs +++ b/compiler/main/HscMain.hs @@ -94,9 +94,11 @@ import BasicTypes ( HValue ) import ByteCodeGen ( byteCodeGen, coreExprToBCOs ) import Linker import CoreTidy ( tidyExpr ) -import Type ( Type, Kind ) +import Type ( Type ) +import {- Kind parts of -} Type ( Kind ) import CoreLint ( lintInteractiveExpr ) import VarEnv ( emptyTidyEnv ) +import THNames ( templateHaskellNames ) import ConLike import GHC.Exts @@ -181,7 +183,7 @@ newHscEnv :: DynFlags -> IO HscEnv newHscEnv dflags = do eps_var <- newIORef initExternalPackageState us <- mkSplitUniqSupply 'r' - nc_var <- newIORef (initNameCache us knownKeyNames) + nc_var <- newIORef (initNameCache us allKnownKeyNames) fc_var <- newIORef emptyModuleEnv return HscEnv { hsc_dflags = dflags, hsc_targets = [], @@ -194,6 +196,13 @@ newHscEnv dflags = do hsc_type_env_var = Nothing } +allKnownKeyNames :: [Name] -- Put here to avoid loops involving DsMeta, +allKnownKeyNames = -- where templateHaskellNames are defined + knownKeyNames +#ifdef GHCI + ++ templateHaskellNames +#endif + -- ----------------------------------------------------------------------------- getWarnings :: Hsc WarningMessages |