<div dir="ltr"><div dir="ltr"><div dir="ltr">Ah great, thanks - it's almost fully clear now.</div><div dir="ltr"><br></div><div>|for-syntax| and |for-template|, is their motivation that |phi:| takes a set of *identifiers* - e.g. (export … (phi: +1 make-protocol-info protocol-info? …)) and hence a separate form is needed to import/export whole modules on given phi:s and that's what these are for e.g. (export … (for-syntax bigmodulename))?<br></div><div dir="ltr"><br></div></div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Tue, 22 Oct 2019 at 22:24, Dimitris Vyzovitis <<a href="mailto:vyzo@hackzen.org">vyzo@hackzen.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div dir="ltr">They are documented in the reference: <a href="https://cons.io/reference/core-prelude.html#module-sugar" target="_blank">https://cons.io/reference/core-prelude.html#module-sugar</a></div><div dir="ltr"><br></div><div>-- vyzo<br></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Tue, Oct 22, 2019 at 5:12 PM Adam <<a href="mailto:adam.mlmb@gmail.com" target="_blank">adam.mlmb@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div dir="ltr">Hi Vyzo,</div><div dir="ltr"><br></div><div dir="ltr">The core prelude (<a href="https://github.com/vyzo/gerbil/blob/master/src/gerbil/prelude/core.ss" target="_blank">https://github.com/vyzo/gerbil/blob/master/src/gerbil/prelude/core.ss</a>) defines some extensions to |import| and |export|.</div><div dir="ltr"><br></div><div dir="ltr">Bumped into studying this in proto.ss, which contains (export ... (struct-out !rpc ...) ...).</div><div dir="ltr">struct-out can be understood from its use - it's for exporting a structure with its constructors, accessors, mutators. (struct-out's definition code is totally unreadable to me though.)</div><div dir="ltr"><br></div><div dir="ltr">All of these are undocumented, may you want to comment on what they are for also with a single use example (or add to some documentation section in your guide)?</div><div dir="ltr"><br></div><div dir="ltr">Thanks!<br>Adam</div><div dir="ltr"><br></div><div>defsyntax-for-import-export:s:<br></div><ul><li><div>for-syntax<br></div></li><li><div>for-template</div></li></ul><div dir="ltr"><br></div><div>defsyntax-for-import:s::<br></div><div dir="ltr"><ul><li>only-in<br></li><li>except-in<br></li><li>rename-in<br></li><li>prefix-in<br></li><li>group-in</li></ul></div><div><br></div><div>defsyntax-for-export:s:<br></div><ul><li>except-out<br></li><li>rename-out<br></li><li>prefix-out<br></li><li>struct-out<br></li></ul></div>
</blockquote></div></div>
</blockquote></div>