summaryrefslogtreecommitdiff
path: root/compiler/main
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2015-08-26 17:58:25 +0200
committerBen Gamari <ben@smart-cactus.org>2015-08-26 20:28:54 +0200
commit792446906c718a08f0870b58acbdf2cfdeb77770 (patch)
tree203119bbf433bc380fb68b87380799802cd72363 /compiler/main
parent89d25b9e7f8b3a40c58916700cd8adfbd9dd4f19 (diff)
downloadhaskell-792446906c718a08f0870b58acbdf2cfdeb77770.tar.gz
Clean up handling of knownKeyNames
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