[project @ 2001-07-24 04:52:49 by ken]
authorken <unknown>
Tue, 24 Jul 2001 04:52:49 +0000 (04:52 +0000)
committerken <unknown>
Tue, 24 Jul 2001 04:52:49 +0000 (04:52 +0000)
Made some code #ifdef GHCI, so that it will compile without GHCI enabled.

ghc/compiler/main/DriverPipeline.hs
ghc/compiler/main/HscMain.lhs

index 75ef178..d7a7b7e 100644 (file)
@@ -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.
index 129166b..339bb5c 100644 (file)
@@ -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 ------------------