diff options
author | David Terei <davidterei@gmail.com> | 2012-07-10 14:21:07 -0700 |
---|---|---|
committer | David Terei <davidterei@gmail.com> | 2012-07-10 14:21:07 -0700 |
commit | 4f764d06f3b9899c09a6a459a22d4be694ee45d9 (patch) | |
tree | cd75bd424074bae4afa9563869f03d8ae500813a /ghc/Main.hs | |
parent | 4450cc7f05c65544514c28aca12a79f78ecf75fb (diff) | |
download | haskell-4f764d06f3b9899c09a6a459a22d4be694ee45d9.tar.gz |
Make a little more of the GHCi internal API configurable
Diffstat (limited to 'ghc/Main.hs')
-rw-r--r-- | ghc/Main.hs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ghc/Main.hs b/ghc/Main.hs index d757c2d706..b65f9124c1 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -24,7 +24,7 @@ import HscMain ( newHscEnv ) import DriverPipeline ( oneShot, compileFile ) import DriverMkDepend ( doMkDependHS ) #ifdef GHCI -import InteractiveUI ( interactiveUI, ghciWelcomeMsg ) +import InteractiveUI ( interactiveUI, ghciWelcomeMsg, defaultGhciSettings ) #endif @@ -217,16 +217,17 @@ main' postLoadMode dflags0 args flagWarnings = do DoMake -> doMake srcs DoMkDependHS -> doMkDependHS (map fst srcs) StopBefore p -> liftIO (oneShot hsc_env p srcs) - DoInteractive -> interactiveUI srcs Nothing - DoEval exprs -> interactiveUI srcs $ Just $ reverse exprs + DoInteractive -> ghciUI srcs Nothing + DoEval exprs -> ghciUI srcs $ Just $ reverse exprs DoAbiHash -> abiHash srcs liftIO $ dumpFinalStats dflags3 +ghciUI :: [(FilePath, Maybe Phase)] -> Maybe [String] -> Ghc () #ifndef GHCI -interactiveUI :: b -> c -> Ghc () -interactiveUI _ _ = - ghcError (CmdLineError "not built for interactive use") +ghciUI _ _ = ghcError (CmdLineError "not built for interactive use") +#else +ghciUI = interactiveUI defaultGhciSettings #endif -- ----------------------------------------------------------------------------- |