[erlang-questions] four element 'fun' tuple in abstract form

Ulf Wiger ulf.wiger@REDACTED
Tue May 19 11:11:49 CEST 2009


Paul Mineiro wrote:
> hi.
> 
> we parse our erlang here as part of our build process.  i noticed recently
> that we are seeing a 4 element 'fun' tuple in the forms produced from
> 
> { _, _, Forms } = compile:file (F, [ binary, 'E', { outdir, Dir } ])

AFAIK, the 'E' option is only intended as a debugging aid,
and its output isn't terribly well defined (in that you are
supposed to rely on it as a programming interface.)

Depending on what you actually want to do with the forms,
perhaps what you should do instead is:

{ok, Forms} = epp:parse_file(F, InclPath, Predefs),
compile:forms(munge_forms(Forms), Options).


BR,
Ulf W
-- 
Ulf Wiger
CTO, Erlang Training & Consulting Ltd
http://www.erlang-consulting.com



More information about the erlang-questions mailing list