X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fiface%2FTcIface.lhs;h=d9072f86d59b9d469440537ddc71a450f0cdfe5b;hp=32735a4e3621f10a7abe74ed6237370aff1a678f;hb=66579ff945831c5fc9a17c58c722ff01f2268d76;hpb=766b34f81d81d009f1070e297756423fbadbd421 diff --git a/compiler/iface/TcIface.lhs b/compiler/iface/TcIface.lhs index 32735a4..d9072f8 100644 --- a/compiler/iface/TcIface.lhs +++ b/compiler/iface/TcIface.lhs @@ -127,7 +127,8 @@ checkWiredInTyCon tc = return () | otherwise = do { mod <- getModule - ; unless (mod == nameModule tc_name) + ; ASSERT( isExternalName tc_name ) + unless (mod == nameModule tc_name) (initIfaceTcRn (loadWiredInHomeIface tc_name)) -- Don't look for (non-existent) Float.hi when -- compiling Float.lhs, which mentions Float of course @@ -144,7 +145,8 @@ importDecl name do { traceIf nd_doc -- Load the interface, which should populate the PTE - ; mb_iface <- loadInterface nd_doc (nameModule name) ImportBySystem + ; mb_iface <- ASSERT2( isExternalName name, ppr name ) + loadInterface nd_doc (nameModule name) ImportBySystem ; case mb_iface of { Failed err_msg -> return (Failed err_msg) ; Succeeded _ -> do @@ -1047,7 +1049,8 @@ ifCheckWiredInThing name -- we may typecheck GHC.Base.hi. At that point, GHC.Base is not in -- the HPT, so without the test we'll demand-load it into the PIT! -- C.f. the same test in checkWiredInTyCon above - ; unless (mod == nameModule name) + ; ASSERT2( isExternalName name, ppr name ) + unless (mod == nameModule name) (loadWiredInHomeIface name) } tcIfaceTyCon :: IfaceTyCon -> IfL TyCon