[Yhc] Some more changes to core
Neil Mitchell
ndmitchell at gmail.com
Mon Aug 6 16:06:52 EDT 2007
Hi
> How much in Core has an "obvious" translation from Haskell, such that
> different implementations or versions, can compile the same Haskell code
> and get the exact same Core text out?
Not a whole lot. There is also the issue of optimisations, even the
very basic ones will permute expressions around. You can get the same
top-level declarations regardless, but that is about it.
> If only local things like the
> details of how let/lambda-bound variables are named, vary, there is more
> possible separate compilation of separate files (or something like that...).
The top level interface can be made very solid, so separate
compilation still works fine.
> I think (line,column) is sufficiently unique identification? Maybe 200_4
> would represent line 200, column 4. (or "200.4"? By itself, that looks
> like a fractional number, which is bad)
That may be sufficient, or not. Consider:
f x = (a,b)
where (a,b) = x
This compiles to something like:
f x = (fst x, snd x)
However, fst and snd are actually lambda's, which could conceivably
have the same source position.
I do think line_col could be made to work though, with some thought,
and it would be a very handy scheme.
Thanks
Neil
More information about the Yhc
mailing list