summaryrefslogtreecommitdiff
path: root/compiler/main
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/main')
-rw-r--r--compiler/main/HscMain.hs12
1 files changed, 10 insertions, 2 deletions
diff --git a/compiler/main/HscMain.hs b/compiler/main/HscMain.hs
index c7cabe6f9a..41418fa50e 100644
--- a/compiler/main/HscMain.hs
+++ b/compiler/main/HscMain.hs
@@ -91,7 +91,8 @@ 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 Panic
@@ -177,7 +178,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 = [],
@@ -190,6 +191,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