[erlang-questions] Private message regarding: adding compile pass

Richard Carlsson carlsson.richard@REDACTED
Wed Apr 26 15:25:42 CEST 2017

You can add a core transform pass, just like a parse transform, but there
is no support for adding passes below that level.

In the source file: -compile({core_transform,Module}).

or on the command line: erlc +'{core_transform,Module}'

will cause Module:core_transform(Code, Options) to be called during


2017-04-26 13:23 GMT+02:00 Karlo Kuna <kuna.prime@REDACTED>:

> it's a shame, looking at source of compliler.erl this feature would be
> easy to add. Are you aware of any such proposal? Also it would be
> interesting to hear opinions on adding such proposal.
> thank you
> On Wed, Apr 26, 2017 at 10:29 AM, Juan Facorro <juan.facorro@REDACTED>
> wrote:
>> On Saturday, April 22, 2017 at 8:58:59 PM UTC+1, Karlo Kuna wrote:
>> > can one add custom compile pass when compiling module??
>> It is not possible to arbitrarily insert a compiler pass in the Erlang
>> compiler. Only parse transforms are currently available as a hook as a sort
>> of preprocessing pass that handle Erlang AST.
>> Cheers,
>> Juan
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170426/207f8809/attachment.htm>

More information about the erlang-questions mailing list