diff --git a/ghc/compiler/compMan/CmLink.lhs b/ghc/compiler/compMan/CmLink.lhs index 3ec42dd77c89cf7a88a35b2abd16e0de84f8039f..8a4c800a66ff31836c1b4ae60d870d149cb66055 100644 --- a/ghc/compiler/compMan/CmLink.lhs +++ b/ghc/compiler/compMan/CmLink.lhs @@ -12,8 +12,7 @@ module CmLink ( Linkable(..), Unlinked(..), PersistentLinkerState{-abstractly!-}, emptyPLS ) where -import StgInterp ( linkIModules, ClosureEnv, ItblEnv ) -import Linker ( loadObj, resolveObjs ) +import Interpreter import CmStaticInfo ( PackageConfigInfo ) import Module ( ModuleName, PackageName ) import InterpSyn ( UnlinkedIBind, HValue, binder ) diff --git a/ghc/compiler/compMan/CompManager.lhs b/ghc/compiler/compMan/CompManager.lhs index 644163ca42893ad9b66062d243c025e49d41a12d..327f716dc33e5e2e98746c4b22873adab2532c1e 100644 --- a/ghc/compiler/compMan/CompManager.lhs +++ b/ghc/compiler/compMan/CompManager.lhs @@ -23,7 +23,7 @@ import CmLink ( PersistentLinkerState, emptyPLS, Linkable(..), link, LinkResult(..), filterModuleLinkables, modname_of_linkable, is_package_linkable ) -import InterpSyn ( HValue ) +import Interpreter ( HValue ) import CmSummarise ( summarise, ModSummary(..), name_of_summary, deps_of_summary, mimp_name, ms_get_imports ) diff --git a/ghc/compiler/main/HscMain.lhs b/ghc/compiler/main/HscMain.lhs index d25fd12ce41e498120396a51a9dee1349040e4df..8ada4be7c4d17e1c55fd87354bb81f7be044df54 100644 --- a/ghc/compiler/main/HscMain.lhs +++ b/ghc/compiler/main/HscMain.lhs @@ -46,10 +46,7 @@ import UniqSupply ( mkSplitUniqSupply ) import Bag ( emptyBag ) import Outputable -#ifdef GHCI -import StgInterp ( stgToInterpSyn, ItblEnv ) -import InterpSyn ( UnlinkedIBind ) -#endif +import Interpreter import HscStats ( ppSourceStats ) import HscTypes ( ModDetails, ModIface(..), PersistentCompilerState(..), PersistentRenamerState(..), ModuleLocation(..), diff --git a/ghc/compiler/main/Interpreter.hs b/ghc/compiler/main/Interpreter.hs new file mode 100644 index 0000000000000000000000000000000000000000..6496eba773c3371d4f1af8d8554325dbb8fd52e6 --- /dev/null +++ b/ghc/compiler/main/Interpreter.hs @@ -0,0 +1,38 @@ +----------------------------------------------------------------------------- +-- $Id: Interpreter.hs,v 1.1 2000/11/07 16:03:38 simonmar Exp $ +-- +-- Interpreter subsystem wrapper +-- +-- (c) The University of Glasgow 2000 +-- +----------------------------------------------------------------------------- + +module Interpreter ( +#ifdef GHCI + module StgInterp, + module InterpSyn, + module Linker +#else + ClosureEnv, ItblEnv, + linkIModules, + stgToInterpSyn, + HValue, + UnlinkedIBinds, + loadObjs, resolveObjs, +#endif + ) where + +#ifdef GHCI +import StgInterp +import InterpSyn +import Linker +#else +type ClosureEnv = () +type ItblEnv = () +linkIModules = error "linkIModules" +stgToInterpSyn = error "linkIModules" +type HValue = () +type UnlinkedIBinds = () +loadObjs = error "loadObjs" +resolveObjs = error "loadObjs" +#endif diff --git a/ghc/compiler/typecheck/TcModule.lhs b/ghc/compiler/typecheck/TcModule.lhs index 10188434f1b3754f844d836cbe58ab3aea714ecc..9c4bf6e0aface98035c2d0dbfa55de2c32f4a150 100644 --- a/ghc/compiler/typecheck/TcModule.lhs +++ b/ghc/compiler/typecheck/TcModule.lhs @@ -252,7 +252,7 @@ tcModule pcs hst get_fixity this_mod decls unf_env tc_insts = map iDFunId local_inst_info, tc_fords = foi_decls ++ foe_decls', tc_rules = local_rules' - }) + } ) get_binds decls = foldr ThenBinds EmptyBinds [binds | ValD binds <- decls]