X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fmain%2FGetImports.hs;h=6c9f9ef16620521ff74f1340bb05416e48ee599e;hb=508a505e9853984bfdaa3ad855ae3fcbc6d31787;hp=e60cb25ddb6b5995aff2f6d88f5fa8228fc6ea43;hpb=f9d8c8e0ab44b24d06b654d98543e8b39d4ebeca;p=ghc-hetmet.git diff --git a/ghc/compiler/main/GetImports.hs b/ghc/compiler/main/GetImports.hs index e60cb25..6c9f9ef 100644 --- a/ghc/compiler/main/GetImports.hs +++ b/ghc/compiler/main/GetImports.hs @@ -15,6 +15,7 @@ import Parser ( parseHeader ) import Lexer ( P(..), ParseResult(..), mkPState ) import HsSyn ( ImportDecl(..), HsModule(..) ) import Module ( Module, mkModule ) +import PrelNames ( gHC_PRIM ) import StringBuffer ( StringBuffer, hGetStringBuffer ) import SrcLoc ( Located(..), mkSrcLoc, unLoc ) import FastString ( mkFastString ) @@ -49,7 +50,8 @@ getImports dflags buf filename = do | otherwise = mkModule "Main" (src_idecls, ord_idecls) = partition isSourceIdecl (map unLoc imps) source_imps = map getImpMod src_idecls - ordinary_imps = map getImpMod ord_idecls + ordinary_imps = filter (/= gHC_PRIM) (map getImpMod ord_idecls) + -- GHC.Prim doesn't exist physically, so don't go looking for it. in return (source_imps, ordinary_imps, mod_name)