<div dir="ltr">The Core Erlang home page is still up: <a href="https://www.it.uu.se/research/group/hipe/cerl/">https://www.it.uu.se/research/group/hipe/cerl/</a><br><div><br></div><div>Caveat: the spec has not been updated with the changes for bitstrings and maps. Would be nice to do that some day...</div><div><br></div><div>The optimal way to represent literals tends to vary between passes, so there's never a clear-cut choice. If you use the cerl.erl module, you'll find some utility functions like fold_literal/1 and unfold_literal/1, is_literal_term/1, etc., that can take care of the details. For example, cons_hd/1 and cons_tl/1 will give you the head subtree even if the argument is a literal list.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><br> /Richard</div></div>
<br><div class="gmail_quote">2017-03-16 17:32 GMT+01:00 Robert Virding <span dir="ltr"><<a href="mailto:rvirding@gmail.com" target="_blank">rvirding@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Does there exist a current definition ofCore Erlang? I know you can look in cerl.erl to see which constructions exist but there is a lot which is unclear on how they are to be used. For example one problem I had was HOW to represent literals. They can either be done by having them literally (haha) inside a #c_lit{} record or as a whole nested tree of Core records. I noticed that even if these are in principle equivalent sometimes later passes of the compile required one or the other to work.<br><br></div><div>I got it working in the LFE compiler but it feels a bit risky not to be certain why it works, and what might happen if I change things.<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>Robert<br><br></div></font></span></div>
<br>______________________________<wbr>_________________<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/<wbr>listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>