Aaron

At the moment, on the way *out* of GHC, it goes like this:
        Core --> converted to ExternalCore
                --> printed to file

On the way *in* we see
        file --> parsed to a mixture of HsSyn and IfaceSyn
                --> typechecked to Core

This is all a bit of a (historically-derived) nonsense, as I think we 
discussed.  And it gives rise to the problems you are seeing, because the HsSyn 
part has this HsTyVarBndr etc.

The same intermediate data type should be used in both directions.  I forget, 
but I think we discussed these alternatives
        a) using IfaceSyn in both directions
        b) or defining a new data type

The advantage of (b) is that you can use a purpose-designed data type.  But the 
disadvantage is that you need to write a type checker.

I'd be inclined to try (a).  After all, that's the way that much of the input 
side works already.  And IfaceSyn has stuff for expressing data type 
declarations etc.  The advantage is that all the typechecking part is already 
done.


Does this ring any bells?

Simon

| -----Original Message-----
| From: Aaron Tomb [mailto:[EMAIL PROTECTED]
| Sent: 08 February 2007 21:47
| To: Simon Peyton-Jones
| Cc: GHC Users Mailing List
| Subject: Re: [Haskell-cafe] External Core
|
|
| On Feb 7, 2007, at 12:29 AM, Simon Peyton-Jones wrote:
|
| > | I am still working on it. Some external events have slowed me down a
| > | little (research, classes, appendicitis), and it has involved more
| > | changes to the innards of GHC than anticipated, but it is still
| > | moving along. If you can wait a little while, it should be possible
| > | to use GHC.
| >
| > I'm delighted to hear it; thank you.  Maybe there are others who'd
| > like to join in?
| >
| > Keep me posted about those "changes to the innards" you mention!
|
| Now that I've had a chance to revisit this code for the first time in
| a while, I think I'm stuck.
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to