From 094b0ead13edc9aebfc55ef864036f55bbddd63a Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 7 Nov 2000 16:03:38 +0000 Subject: [PATCH] [project @ 2000-11-07 16:03:38 by simonmar] Fix compilation with 4.08.1 --- ghc/compiler/compMan/CmLink.lhs | 3 +-- ghc/compiler/compMan/CompManager.lhs | 2 +- ghc/compiler/main/HscMain.lhs | 5 +---- ghc/compiler/main/Interpreter.hs | 38 ++++++++++++++++++++++++++++++++++ ghc/compiler/typecheck/TcModule.lhs | 2 +- 5 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 ghc/compiler/main/Interpreter.hs diff --git a/ghc/compiler/compMan/CmLink.lhs b/ghc/compiler/compMan/CmLink.lhs index 3ec42dd..8a4c800 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 644163c..327f716 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 d25fd12..8ada4be 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 0000000..6496eba --- /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 1018843..9c4bf6e 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] -- 1.7.10.4