diff options
-rw-r--r-- | compiler/ghci/GHCi.hs | 16 | ||||
-rw-r--r-- | ghc.mk | 1 | ||||
-rw-r--r-- | ghc/Main.hs | 7 | ||||
-rw-r--r-- | libraries/ghci/GHCi/BreakArray.hs | 9 | ||||
-rw-r--r-- | rts/ghc.mk | 9 |
5 files changed, 11 insertions, 31 deletions
diff --git a/compiler/ghci/GHCi.hs b/compiler/ghci/GHCi.hs index 472f0857cb..e0b76ebc29 100644 --- a/compiler/ghci/GHCi.hs +++ b/compiler/ghci/GHCi.hs @@ -49,9 +49,7 @@ module GHCi import GhcPrelude import GHCi.Message -#if defined(GHCI) -import GHCi.Run -#endif + import GHCi.RemoteTypes import GHCi.ResolvedBCO import GHCi.BreakArray (BreakArray) @@ -154,11 +152,11 @@ Other Notes on Remote GHCi * Note [Remote Template Haskell] in libraries/ghci/GHCi/TH.hs -} -#if !defined(GHCI) + needExtInt :: IO a needExtInt = throwIO (InstallationError "this operation requires -fexternal-interpreter") -#endif + -- | Run a command in the interpreter's context. With -- @-fexternal-interpreter@, the command is serialized and sent to an @@ -172,11 +170,7 @@ iservCmd hsc_env@HscEnv{..} msg uninterruptibleMask_ $ do -- Note [uninterruptibleMask_] iservCall iserv msg | otherwise = -- Just run it directly -#if defined(GHCI) - run msg -#else needExtInt -#endif -- Note [uninterruptibleMask_ and iservCmd] -- @@ -377,11 +371,7 @@ lookupSymbol hsc_env@HscEnv{..} str writeIORef iservLookupSymbolCache $! addToUFM cache str p return (Just p) | otherwise = -#if defined(GHCI) - fmap fromRemotePtr <$> run (LookupSymbol (unpackFS str)) -#else needExtInt -#endif lookupClosure :: HscEnv -> String -> IO (Maybe HValueRef) lookupClosure hsc_env str = @@ -424,6 +424,7 @@ PACKAGES_STAGE0 = binary text transformers mtl parsec Cabal/Cabal hpc ghc-boot-t ifeq "$(Windows_Host)" "NO" PACKAGES_STAGE0 += terminfo endif +PACKAGES_STAGE0 += haskeline PACKAGES_STAGE1 += ghc-prim PACKAGES_STAGE1 += $(INTEGER_LIBRARY) diff --git a/ghc/Main.hs b/ghc/Main.hs index eda6a3d2a1..925e0058a0 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -25,9 +25,7 @@ import HscMain ( newHscEnv ) import DriverPipeline ( oneShot, compileFile ) import DriverMkDepend ( doMkDependHS ) import DriverBkp ( doBackpack ) -#if defined(GHCI) import GHCi.UI ( interactiveUI, ghciWelcomeMsg, defaultGhciSettings ) -#endif -- Frontend plugins #if defined(GHCI) @@ -257,15 +255,10 @@ main' postLoadMode dflags0 args flagWarnings = do ghciUI :: HscEnv -> DynFlags -> [(FilePath, Maybe Phase)] -> Maybe [String] -> Ghc () -#if !defined(GHCI) -ghciUI _ _ _ _ = - throwGhcException (CmdLineError "not built for interactive use") -#else ghciUI hsc_env dflags0 srcs maybe_expr = do dflags1 <- liftIO (initializePlugins hsc_env dflags0) _ <- GHC.setSessionDynFlags dflags1 interactiveUI defaultGhciSettings srcs maybe_expr -#endif -- ----------------------------------------------------------------------------- -- Splitting arguments into source files and object files. This is where we diff --git a/libraries/ghci/GHCi/BreakArray.hs b/libraries/ghci/GHCi/BreakArray.hs index bece43bdb9..d5b998e158 100644 --- a/libraries/ghci/GHCi/BreakArray.hs +++ b/libraries/ghci/GHCi/BreakArray.hs @@ -19,17 +19,17 @@ module GHCi.BreakArray ( BreakArray -#ifdef GHCI + (BA) -- constructor is exported only for ByteCodeGen , newBreakArray , getBreak , setBreakOn , setBreakOff , showBreakArray -#endif + ) where -#ifdef GHCI + import Control.Monad import Data.Word import GHC.Word @@ -115,6 +115,3 @@ readBA# array i = IO $ \s -> readBreakArray :: BreakArray -> Int -> IO Word8 readBreakArray (BA array) (I# i) = readBA# array i -#else -data BreakArray -#endif diff --git a/rts/ghc.mk b/rts/ghc.mk index 61547206da..5c60ccf50d 100644 --- a/rts/ghc.mk +++ b/rts/ghc.mk @@ -322,8 +322,8 @@ $(eval $(call distdir-opts,rts,dist,1)) # We like plenty of warnings. WARNING_OPTS += -Wall WARNING_OPTS += -Wextra -WARNING_OPTS += -Wstrict-prototypes -WARNING_OPTS += -Wmissing-prototypes +WARNING_OPTS += -Wstrict-prototypes +WARNING_OPTS += -Wmissing-prototypes WARNING_OPTS += -Wmissing-declarations WARNING_OPTS += -Winline WARNING_OPTS += -Waggregate-return @@ -341,7 +341,7 @@ endif #WARNING_OPTS += -Wshadow #WARNING_OPTS += -Wcast-qual -# This one seems buggy on GCC 4.1.2, which is the only GCC version we +# This one seems buggy on GCC 4.1.2, which is the only GCC version we # have that can bootstrap the SPARC build. We end up with lots of supurious # warnings of the form "cast increases required alignment of target type". # Some legitimate warnings can be fixed by adding an intermediate cast to @@ -373,7 +373,7 @@ rts_CC_OPTS += -DUSE_LIBFFI_FOR_ADJUSTORS endif # We *want* type-checking of hand-written cmm. -rts_HC_OPTS += -dcmm-lint +rts_HC_OPTS += -dcmm-lint # -fno-strict-aliasing is required for the runtime, because we often # use a variety of types to represent closure pointers (StgPtr, @@ -637,4 +637,3 @@ install_libffi_headers : $(eval $(call clean-target,rts,dist,rts/dist)) BINDIST_EXTRAS += rts/package.conf.in - |