summaryrefslogtreecommitdiff
path: root/compiler/main/DynFlags.hs
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2016-12-20 01:19:18 +0000
committerTamar Christina <tamar@zhox.com>2016-12-20 01:25:48 +0000
commit27f79255634d9789f367273504545c1ebfad90a0 (patch)
tree9d2977cd52f18abcc824dae743ec7c4a3e6f04c0 /compiler/main/DynFlags.hs
parentc0c1f801f4ca26f1db68ac527341a1cf051cb7d6 (diff)
downloadhaskell-27f79255634d9789f367273504545c1ebfad90a0.tar.gz
Allow use of the external interpreter in stage1.
Summary: Now that we have -fexternal-interpreter, we can lose most of the GHCI ifdefs. This was originally added in https://phabricator.haskell.org/D2826 but that led to a compatibility issue with ghc 7.10.x on Windows. That's fixed here and the revert reverted. Reviewers: goldfire, hvr, austin, bgamari, Phyx Reviewed By: Phyx Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2884 GHC Trac Issues: #13008
Diffstat (limited to 'compiler/main/DynFlags.hs')
-rw-r--r--compiler/main/DynFlags.hs29
1 files changed, 0 insertions, 29 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index aee5edce85..6ecf8ca9a9 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -124,9 +124,7 @@ module DynFlags (
-- * Compiler configuration suitable for display to the user
compilerInfo,
-#ifdef GHCI
rtsIsProfiled,
-#endif
dynamicGhc,
#include "GHCConstantsHaskellExports.hs"
@@ -3613,12 +3611,6 @@ supportedExtensions :: [String]
supportedExtensions = concatMap toFlagSpecNamePair xFlags
where
toFlagSpecNamePair flg
-#ifndef GHCI
- -- make sure that `ghc --supported-extensions` omits
- -- "TemplateHaskell" when it's known to be unsupported. See also
- -- GHC #11102 for rationale
- | flagSpecFlag flg == LangExt.TemplateHaskell = [noName]
-#endif
| otherwise = [name, noName]
where
noName = "No" ++ name
@@ -4155,7 +4147,6 @@ foreign import ccall unsafe "rts_isProfiled" rtsIsProfiledIO :: IO CInt
rtsIsProfiled :: Bool
rtsIsProfiled = unsafeDupablePerformIO rtsIsProfiledIO /= 0
-#ifdef GHCI
-- Consult the RTS to find whether GHC itself has been built with
-- dynamic linking. This can't be statically known at compile-time,
-- because we build both the static and dynamic versions together with
@@ -4164,10 +4155,6 @@ foreign import ccall unsafe "rts_isDynamic" rtsIsDynamicIO :: IO CInt
dynamicGhc :: Bool
dynamicGhc = unsafeDupablePerformIO rtsIsDynamicIO /= 0
-#else
-dynamicGhc :: Bool
-dynamicGhc = False
-#endif
setWarnSafe :: Bool -> DynP ()
setWarnSafe True = getCurLoc >>= \l -> upd (\d -> d { warnSafeOnLoc = l })
@@ -4200,24 +4187,8 @@ setIncoherentInsts True = do
upd (\d -> d { incoherentOnLoc = l })
checkTemplateHaskellOk :: TurnOnFlag -> DynP ()
-#ifdef GHCI
checkTemplateHaskellOk _turn_on
= getCurLoc >>= \l -> upd (\d -> d { thOnLoc = l })
-#else
--- In stage 1, Template Haskell is simply illegal, except with -M
--- We don't bleat with -M because there's no problem with TH there,
--- and in fact GHC's build system does ghc -M of the DPH libraries
--- with a stage1 compiler
-checkTemplateHaskellOk turn_on
- | turn_on = do dfs <- liftEwM getCmdLineState
- case ghcMode dfs of
- MkDepend -> return ()
- _ -> addErr msg
- | otherwise = return ()
- where
- msg = "Template Haskell requires GHC with interpreter support\n " ++
- "Perhaps you are using a stage-1 compiler?"
-#endif
{- **********************************************************************
%* *