darcs patch: Get External Core (-fext-core) working with
atomb at soe.ucsc.edu
Wed Nov 1 12:58:24 EST 2006
Good to know about. I did part of this, as well --- printing External
Core in 6.7 resulted in a panic, since coercions weren't translated,
and I fixed that. The patch mentioned below goes beyond mine, though,
by adding support for foreign labels. Fortunately, what I did was
only a few lines, and not much work. I was waiting to finish work on
the parser before I sent in a patch.
On the topic of parsing, it seems significantly harder to get
working, largely because, as Simon M was kind enough to point out,
IfaceSyn now uses Name rather than IfaceExtName. Therefore, the
parser needs to be able to assign a Unique value to each identifier
it encounters. Unlike the renamer, it doesn't need to figure out what
external identifier each one refers to, since they're all fully-
qualified, and refer to original, defining occurrences. Only local
variables may have overlapping names, it seems.
So, does anyone familiar with the renaming process for Haskell source
have any suggestions as to the best way to accomplish the simpler
Unique generation necessary for External Core?
Also, Sam, if you're also interested in getting the parser working,
we should coordinate so that we don't duplicate work.
On Nov 1, 2006, at 12:00 AM, Simon Peyton-Jones wrote:
> Thanks Sam.
> Ian would you like to apply this, please?
> Aaron: as keeper of External Core, you should know about this.
> | -----Original Message-----
> | From: cvs-all-bounces at haskell.org [mailto:cvs-all-
> bounces at haskell.org]
> On Behalf Of Samuel Bronson
> | Sent: 01 November 2006 01:15
> | To: cvs-ghc at haskell.org
> | Subject: darcs patch: Get External Core (-fext-core) working with
> | Tue Oct 31 19:36:49 EST 2006 Samuel Bronson <naesten at gmail.com>
> | * Get External Core (-fext-core) working with readline
> | Had to add support for dynamic C calls and for foreign labels
> | constants). Actually I only did the printing side -- parsing is
> | done yet. But at least now you can build the libraries with
> | I also got the function arrow to print out properly again (it was
> | printing fully-qualified and z-coded!)
> | I also added a field for calling convention name to the External
> | data constructor in ExternalCore.Exp (for static C calls).
> | I'm not exactly sure where to document all of this, so I haven't
> | that, though I did comment the code a bit.
More information about the Cvs-ghc