<div dir="ltr">I'm not sure this meets the usual definition of metaprogramming. While it's possible to write a Mercury program that is compiled and then inputs and works on another Mercury program, it doesn't seem to be possible to write a program or part of a program that is executed during compilation to manipulate its own code. Or is it?<div><br></div><div>(Sorry for jumping in but I love metaprogramming :) )<br><div><br></div><div>Mark</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 8 February 2016 at 22:28, Tomas By <span dir="ltr"><<a href="mailto:tomas@basun.net" target="_blank">tomas@basun.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
The "term" library?<br>
<br>
Meta-programming as I understand it (transforming Mercury code in Mercury) is very easy.<br>
<br>
If you can be more specific you may get better help.<br>
<br>
/Tomas<div><div class="h5"><br>
<br>
<br>
<br>
On 2016-02-08 22:13, Christophe Rey wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi everybody,<br>
I am a total newbie with Mercury. I have searched in the documentation<br>
but have found very little information about metaprogramming.<br>
I know that, in Mercury, metaprograms must follow the ground<br>
representation of variables, and this is exactly what I need. But I<br>
wonder if the existing libraries (and which ones) provide important<br>
predicates that are useful in the context of ground metaprogramming,<br>
such as unification of object terms in their ground representation, or<br>
substitutions manipulation predicates. Indeed such predicates may need<br>
a heavy work to be coded in Mercury...<br>
Thanks in advance<br>
Regards<br>
Christophe<br></div></div>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.mercurylang.org" target="_blank">users@lists.mercurylang.org</a><br>
<a href="https://www.mercurylang.org/lists/listinfo/users" rel="noreferrer" target="_blank">https://www.mercurylang.org/lists/listinfo/users</a><br>
</blockquote>
<br>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.mercurylang.org" target="_blank">users@lists.mercurylang.org</a><br>
<a href="https://www.mercurylang.org/lists/listinfo/users" rel="noreferrer" target="_blank">https://www.mercurylang.org/lists/listinfo/users</a><br>
</blockquote></div><br></div>