<p dir="ltr">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.</p>
<div class="gmail_quote">Den 6 jul 2016 22:50 skrev "Peti Gömöri" <<a href="mailto:gomoripeti@gmail.com">gomoripeti@gmail.com</a>>:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>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.</div><div><br></div><div>I managed to shrink it down to a module like this</div><div><br></div><div><div> -module(infinity).</div><div> -export([f/1]).</div><div> -include_lib("syntax_tools/include/merl.hrl").</div><div> f(V) -> merl:qquote("@var", [{var, V}]).</div></div><div><br></div><div>( or this oneliner call</div><div><div> Form = merl:quote("f(V) -> merl:qquote(\"@var\", [{var, V}])."), merl_transform:parse_transform([Form], []).</div><div>)</div></div><div><br></div><div>Seems to me that the optimisation to create templates at compile time in merl_transform:expand_qquote is tricked.</div><div><br></div><div>Can this be considered a bug? I would expect either a compilation error or just silently creating a module which will throw at runtime.</div><div><br></div><div><br></div><div>thanks</div><div>Peter</div></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div>