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

Juan Martín <>
Wed Apr 26 15:27:52 CEST 2017


Nice! I didn't know about that one, obviously :P.

On Wed, Apr 26, 2017, 2:25 PM Richard Carlsson <>
wrote:

> 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
> compilation.
>
>
>
>         /Richard
>
> 2017-04-26 13:23 GMT+02:00 Karlo Kuna <>:
>
>> 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 <>
>> 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
>> 
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170426/33086ecf/attachment.html>


More information about the erlang-questions mailing list