Sat Oct 18 23:10:28 CEST 2003
----- Original Message -----
From: "Richard Carlsson" <richardc@REDACTED>
To: "Joe Armstrong" <joe@REDACTED>
Sent: Tuesday, September 23, 2003 3:16 PM
Subject: Re: soure->source Xformer
> On Tue, 23 Sep 2003, Joe Armstrong wrote:
> > > sys_pre_expand already *does* expand away records and list
> > > comprehensions (do "c(foo, ['E'])." and look at the "foo.E" file).
> > Sorry - I'd forgotten aabout the records - but the expansion of list
> > comprehensions is missing ...
> You're right; sorry - list comprehensions are dealt with in the
> 'v3_core' module. (And it is messy because it is expanding and
> translating at the same time. It is a much nicer approach to put every
> nontrivial transformation in a separate pass, even if it means that you
> traverse stuff more than once.)
Sorry for being very late in commenting again. :-)
There are two reasons that list comprehensions are dealt with in this pass:
1. The syntactic construct exists in erlang but not in Core and I don't really
want to add it to core as it is not needed there.
2. Core contains local functions but not Erlang. These make it easy to
expand lc:s as most of the real work is is handling the funs.
More information about the erlang-questions