summaryrefslogtreecommitdiff
path: root/compiler/main/Hooks.hs
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2016-12-17 20:08:58 -0500
committerBen Gamari <ben@smart-cactus.org>2016-12-17 20:58:35 -0500
commit52ba9470a7e85d025dc84a6789aa809cdd68b566 (patch)
treeeedb856723fb2dc0101b946af3702e6c6aee18da /compiler/main/Hooks.hs
parente0fe7c3131c4a18ddd9dd9f2afdd46cafc8cd7ae (diff)
downloadhaskell-52ba9470a7e85d025dc84a6789aa809cdd68b566.tar.gz
Allow use of the external interpreter in stage1.
Now that we have -fexternal-interpreter, we can lose most of the GHCI ifdefs. Reviewers: simonmar, goldfire, austin, hvr, bgamari Reviewed By: simonmar Subscribers: RyanGlScott, mpickering, angerman, thomie Differential Revision: https://phabricator.haskell.org/D2826
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