[erlang-questions] infinite loop in merl_tranform

Richard Carlsson carlsson.richard@REDACTED
Fri Jul 8 10:48:19 CEST 2016

Thanks for the report. Definitely sounds like a bug. I'm on vacation right
now, but will look at it as soon as I can.
Den 6 jul 2016 22:50 skrev "Peti Gömöri" <gomoripeti@REDACTED>:


While being knee deep in metaprogramming with merl (OTP 18.3) I made a
small typo which led the compilation of my module into an infinite loop.

I managed to shrink it down to a module like this

    f(V) -> merl:qquote("@var", [{var, V}]).

( or this oneliner call
    Form = merl:quote("f(V) -> merl:qquote(\"@var\", [{var, V}])."),
merl_transform:parse_transform([Form], []).

Seems to me that the optimisation to create templates at compile time in
merl_transform:expand_qquote is tricked.

Can this be considered a bug? I would expect either a compilation error or
just silently creating a module which will throw at runtime.


erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160708/438b8d04/attachment.htm>

More information about the erlang-questions mailing list