diff options
author | simonpj <unknown> | 2003-07-09 11:06:32 +0000 |
---|---|---|
committer | simonpj <unknown> | 2003-07-09 11:06:32 +0000 |
commit | f8031f577f9667ef1ab439b11fdd15fc39a79630 (patch) | |
tree | f61e4d4d0c3d92bf0555a2e05109290849f2ea21 /ghc/compiler/codeGen/CodeGen.lhs | |
parent | 38c8801e397417be75ac4427d9c0a62a7942e0eb (diff) | |
download | haskell-f8031f577f9667ef1ab439b11fdd15fc39a79630.tar.gz |
[project @ 2003-07-09 11:06:31 by simonpj]
--------------------------
Fix two External-Core bugs
--------------------------
1. An inadvertent "let x = ...x..." bug in TcRnDriver
2. Adjust the new -main-is story, so that the root module is called
":Main" instead of "$Main".
This means that the z-encoded module name is "ZCMain" rather than "zdMain",
which in keeps the External-Core lexer happy. And is more consistent generally.
3. Make the renamer happy to see definitions from modules other than the "home" one,
when doing External Core. In the main module, there'll be a definition for
ZCMain.main.
Diffstat (limited to 'ghc/compiler/codeGen/CodeGen.lhs')
-rw-r--r-- | ghc/compiler/codeGen/CodeGen.lhs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ghc/compiler/codeGen/CodeGen.lhs b/ghc/compiler/codeGen/CodeGen.lhs index 8606ff9116..5b01138cd8 100644 --- a/ghc/compiler/codeGen/CodeGen.lhs +++ b/ghc/compiler/codeGen/CodeGen.lhs @@ -28,7 +28,7 @@ import DriverState ( v_Build_tag, v_MainModIs ) import StgSyn import CgMonad import AbsCSyn -import PrelNames ( gHC_PRIM, dOLLAR_MAIN, mAIN_Name ) +import PrelNames ( gHC_PRIM, rOOT_MAIN, mAIN_Name ) import CLabel ( mkSRTLabel, mkClosureLabel, mkPlainModuleInitLabel, mkModuleInitLabel ) import PprAbsC ( dumpRealC ) @@ -148,7 +148,7 @@ mkModuleInit way cost_centre_info this_mod mb_main_mod foreign_stubs imported_mo register_mod_imports = map mk_import_register imported_mods -- When compiling the module in which the 'main' function lives, - -- we inject an extra stg_init procedure for stg_init_zdMain, for the + -- we inject an extra stg_init procedure for stg_init_ZCMain, for the -- RTS to invoke. We must consult the -main-is flag in case the -- user specified a different function to Main.main main_mod_name = case mb_main_mod of @@ -158,7 +158,7 @@ mkModuleInit way cost_centre_info this_mod mb_main_mod foreign_stubs imported_mo | Module.moduleName this_mod /= main_mod_name = AbsCNop -- The normal case | otherwise -- this_mod contains the main function - = CCodeBlock (mkPlainModuleInitLabel dOLLAR_MAIN) + = CCodeBlock (mkPlainModuleInitLabel rOOT_MAIN) (CJump (CLbl (mkPlainModuleInitLabel this_mod) CodePtrRep)) in |