Re: How to generate C-- inside an Haskell program

John Meacham <[email protected]> Tue, 13 Sep 2005 16:16:22 -0700
Newsgroups gmane.comp.lang.c--
Message-ID <[email protected]>
On Sat, Sep 10, 2005 at 11:42:44PM +0200, Alain Cremieux wrote:
> Hi,
> I am taking the opportunity of some movements on the mailing-list to ask 
> this question.
> 
> I have translated Paul Govereau's Tiger compiler from O'Caml to Haskell 
> (and Haskell's tools, Alex and Happy). It works and produces roughly the 
> same C-- output as the original.
> In this compiler, the C-- code is produced simply by writing code to a file.
> Now I would like to generate C-- using modules which have probably been 
> developped in the (unfinished) part of GHC dealing with C--. Is there 
> any documentation about these modules, or are there some examples 
> available in the CVS tree that I can take as models ?

I have wanted the same thing on a couple occasions. perhaps the code can
be pulled out and put into Language.Cmm.* or something? I think it is
still evolving though.
        John

-- 
John Meacham - ⑆repetae.net⑆john⑈