From: simonmar Date: Wed, 6 Mar 2002 09:21:17 +0000 (+0000) Subject: [project @ 2002-03-06 09:21:17 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~2301 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=b4a2e1ebadb91edd8a2099a9d55df98ba463cc64;p=ghc-hetmet.git [project @ 2002-03-06 09:21:17 by simonmar] Don't try to call findModule for GHC.Prim, which doesn't exist any more (should fix the Maybe.fromJust panic in last night's build). --- diff --git a/ghc/compiler/main/HscMain.lhs b/ghc/compiler/main/HscMain.lhs index 8c41409..8e82ede 100644 --- a/ghc/compiler/main/HscMain.lhs +++ b/ghc/compiler/main/HscMain.lhs @@ -5,7 +5,7 @@ \section[GHC_Main]{Main driver for Glasgow Haskell compiler} \begin{code} -module HscMain ( HscResult(..), hscMain, +module HscMain ( HscResult(..), hscMain, #ifdef GHCI hscStmt, hscThing, hscModuleContents, #endif @@ -32,7 +32,6 @@ import Module ( lookupModuleEnv ) import RdrName ( rdrEnvElts ) import PrelNames ( iNTERACTIVE ) import StringBuffer ( stringToStringBuffer ) -import FastString ( mkFastString ) import Maybes ( catMaybes ) import List ( nub ) @@ -52,7 +51,7 @@ import Rename ( checkOldIface, renameModule, closeIfaceDecls ) import Rules ( emptyRuleBase ) import PrelInfo ( wiredInThingEnv, wiredInThings ) import PrelRules ( builtinRules ) -import PrelNames ( knownKeyNames ) +import PrelNames ( knownKeyNames, gHC_PRIM_Name ) import MkIface ( mkFinalIface ) import TcModule import InstEnv ( emptyInstEnv ) @@ -327,7 +326,11 @@ hscRecomp ghci_mode dflags have_object local_tycons = typeEnvTyCons env_tc local_classes = typeEnvClasses env_tc - imported_module_names = map ideclName (hsModuleImports rdr_module) + imported_module_names = + filter (/= gHC_PRIM_Name) $ + map ideclName (hsModuleImports rdr_module) + -- eek! doesn't this keep rdr_module live until code generation? + -- SDM 3/2002 mod_name_to_Module nm = do m <- findModule nm ; return (fst (fromJust m))