summaryrefslogtreecommitdiff
path: root/compiler/main/Hooks.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/Hooks.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/Hooks.hs')
-rw-r--r--compiler/main/Hooks.hs14
1 files changed, 0 insertions, 14 deletions
diff --git a/compiler/main/Hooks.hs b/compiler/main/Hooks.hs
index 8d706d8fa5..eefdde4b88 100644
--- a/compiler/main/Hooks.hs
+++ b/compiler/main/Hooks.hs
@@ -15,18 +15,14 @@ module Hooks ( Hooks
, tcForeignImportsHook
, tcForeignExportsHook
, hscFrontendHook
-#ifdef GHCI
, hscCompileCoreExprHook
-#endif
, ghcPrimIfaceHook
, runPhaseHook
, runMetaHook
, linkHook
, runRnSpliceHook
-#ifdef GHCI
, getValueSafelyHook
, createIservProcessHook
-#endif
) where
import DynFlags
@@ -42,12 +38,10 @@ import TcRnTypes
import Bag
import RdrName
import CoreSyn
-#ifdef GHCI
import GHCi.RemoteTypes
import SrcLoc
import Type
import System.Process
-#endif
import BasicTypes
import Data.Maybe
@@ -70,18 +64,14 @@ emptyHooks = Hooks
, tcForeignImportsHook = Nothing
, tcForeignExportsHook = Nothing
, hscFrontendHook = Nothing
-#ifdef GHCI
, hscCompileCoreExprHook = Nothing
-#endif
, ghcPrimIfaceHook = Nothing
, runPhaseHook = Nothing
, runMetaHook = Nothing
, linkHook = Nothing
, runRnSpliceHook = Nothing
-#ifdef GHCI
, getValueSafelyHook = Nothing
, createIservProcessHook = Nothing
-#endif
}
data Hooks = Hooks
@@ -89,18 +79,14 @@ data Hooks = Hooks
, tcForeignImportsHook :: Maybe ([LForeignDecl Name] -> TcM ([Id], [LForeignDecl Id], Bag GlobalRdrElt))
, tcForeignExportsHook :: Maybe ([LForeignDecl Name] -> TcM (LHsBinds TcId, [LForeignDecl TcId], Bag GlobalRdrElt))
, hscFrontendHook :: Maybe (ModSummary -> Hsc FrontendResult)
-#ifdef GHCI
, hscCompileCoreExprHook :: Maybe (HscEnv -> SrcSpan -> CoreExpr -> IO ForeignHValue)
-#endif
, ghcPrimIfaceHook :: Maybe ModIface
, runPhaseHook :: Maybe (PhasePlus -> FilePath -> DynFlags -> CompPipeline (PhasePlus, FilePath))
, runMetaHook :: Maybe (MetaHook TcM)
, linkHook :: Maybe (GhcLink -> DynFlags -> Bool -> HomePackageTable -> IO SuccessFlag)
, runRnSpliceHook :: Maybe (HsSplice Name -> RnM (HsSplice Name))
-#ifdef GHCI
, getValueSafelyHook :: Maybe (HscEnv -> Name -> Type -> IO (Maybe HValue))
, createIservProcessHook :: Maybe (CreateProcess -> IO ProcessHandle)
-#endif
}
getHooked :: (Functor f, HasDynFlags f) => (Hooks -> Maybe a) -> a -> f a