Commit 1146fac5 authored by ken's avatar ken
Browse files

[project @ 2001-07-24 04:52:49 by ken]

Made some code #ifdef GHCI, so that it will compile without GHCI enabled.
parent 276ee4fa
-----------------------------------------------------------------------------
-- $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.
......
......@@ -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 ------------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment