From: ken Date: Tue, 24 Jul 2001 04:52:49 +0000 (+0000) Subject: [project @ 2001-07-24 04:52:49 by ken] X-Git-Tag: Approximately_9120_patches~1448 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=1146fac547be56172cd0432028e3f4e794e401cd;p=ghc-hetmet.git [project @ 2001-07-24 04:52:49 by ken] Made some code #ifdef GHCI, so that it will compile without GHCI enabled. --- diff --git a/ghc/compiler/main/DriverPipeline.hs b/ghc/compiler/main/DriverPipeline.hs index 75ef178..d7a7b7e 100644 --- a/ghc/compiler/main/DriverPipeline.hs +++ b/ghc/compiler/main/DriverPipeline.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: DriverPipeline.hs,v 1.92 2001/07/23 20:19:53 sof Exp $ +-- $Id: DriverPipeline.hs,v 1.93 2001/07/24 04:52:49 ken Exp $ -- -- GHC Driver -- @@ -1004,8 +1004,10 @@ compile ghci_mode summary source_unchanged have_object -- as our "unlinked" object. HscInterpreted -> case maybe_interpreted_code of +#ifdef GHCI Just (bcos,itbl_env) -> do tm <- getClockTime return ([BCOs bcos itbl_env], tm) +#endif Nothing -> panic "compile: no interpreted code" -- we're in batch mode: finish the compilation pipeline. diff --git a/ghc/compiler/main/HscMain.lhs b/ghc/compiler/main/HscMain.lhs index 129166b..339bb5c 100644 --- a/ghc/compiler/main/HscMain.lhs +++ b/ghc/compiler/main/HscMain.lhs @@ -106,8 +106,11 @@ data HscResult ModIface -- new iface (if any compilation was done) Bool -- stub_h exists Bool -- stub_c exists +#ifdef GHCI (Maybe ([UnlinkedBCO],ItblEnv)) -- interpreted code, if any - +#else + (Maybe ()) -- no interpreted code whatsoever +#endif -- no errors or warnings; the individual passes -- (parse/rename/typecheck) print messages themselves @@ -322,6 +325,7 @@ hscRecomp ghci_mode dflags have_object ; (stub_h_exists, stub_c_exists, maybe_bcos, final_iface ) <- if toInterp +#ifdef GHCI then do ----------------- Generate byte code ------------------ (bcos,itbl_env) <- byteCodeGen dflags binds @@ -336,6 +340,9 @@ hscRecomp ghci_mode dflags have_object maybe_checked_iface new_iface tidy_details return ( False, False, Just (bcos,itbl_env), final_iface ) +#else + then error "GHC not compiled with interpreter" +#endif else do ----------------- Convert to STG ------------------