External Core front end is completely broken

Kirsten Chevalier krc at uclink.berkeley.edu
Wed Jul 9 18:44:24 EDT 2003


On Wed, Jul 09, 2003 at 12:08:50PM +0100, Simon Peyton-Jones wrote:
> Ah, yes.  Fixed.
> 
> | -----Original Message-----
> | From: glasgow-haskell-bugs-admin at haskell.org
> [mailto:glasgow-haskell-bugs-admin at haskell.org] On
> | Behalf Of Kirsten Chevalier
> | Sent: 09 July 2003 00:25
> | To: glasgow-haskell-bugs at haskell.org
> | Subject: External Core front end is completely broken
> | 
> | Using the latest version of GHC downloaded from CVS, it's impossible
> to use
> | GHC to compile any .hcr files that it generates itself. The reason for
> this
> | is that, as per the CVS log for prelude/PrelNames.lhs, all "Main"
> modules now
> | contain a definition for $Main.main -- however, the External Core
> lexer
> | still requires module names to begin with an upper-case letter,
> resulting in
> | a parse error.

Not quite -- the RTS still expected the main closure to be called
zdMain_main_closure, but once I fixed that, everything works as expected.
Patches are attached.

-- 
Kirsten Chevalier * krc at uclink.berkeley.edu * Often in error, never in doubt
-------------- next part --------------
Index: Prelude.h
===================================================================
RCS file: /cvs/fptools/ghc/rts/Prelude.h,v
retrieving revision 1.23
diff -r1.23 Prelude.h
21c21
< extern StgClosure zdMain_main_closure;
---
> extern StgClosure ZCMain_main_closure;
70c70
< #define mainIO_closure            (&zdMain_main_closure)
---
> #define mainIO_closure            (&ZCMain_main_closure)
-------------- next part --------------
Index: Main.c
===================================================================
RCS file: /cvs/fptools/ghc/rts/Main.c,v
retrieving revision 1.38
diff -r1.38 Main.c
44c44
< extern void __stginit_zdMain(void);
---
> extern void __stginit_ZCMain(void);
56c56
<     startupHaskell(argc,argv,__stginit_zdMain);
---
>     startupHaskell(argc,argv,__stginit_ZCMain);


More information about the Glasgow-haskell-bugs mailing list