[m-users.] Metaprogramming in Mercury

Mark Green mgreen at brookes.ac.uk
Wed Feb 10 01:37:05 AEDT 2016


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?

(Sorry for jumping in but I love metaprogramming :) )

Mark

On 8 February 2016 at 22:28, Tomas By <tomas at basun.net> wrote:

> Hello,
>
> The "term" library?
>
> Meta-programming as I understand it (transforming Mercury code in Mercury)
> is very easy.
>
> If you can be more specific you may get better help.
>
> /Tomas
>
>
>
>
> On 2016-02-08 22:13, Christophe Rey wrote:
>
>> Hi everybody,
>> I am a total newbie with Mercury. I have searched in the documentation
>> but have found very little information about metaprogramming.
>> I know that, in Mercury, metaprograms must follow the ground
>> representation of variables, and this is exactly what I need. But I
>> wonder if the existing libraries (and which ones) provide important
>> predicates that are useful in the context of ground metaprogramming,
>> such as unification of object terms in their ground representation, or
>> substitutions manipulation predicates. Indeed such predicates may need
>> a heavy work to be coded in Mercury...
>> Thanks in advance
>> Regards
>> Christophe
>> _______________________________________________
>> users mailing list
>> users at lists.mercurylang.org
>> https://www.mercurylang.org/lists/listinfo/users
>>
>
> _______________________________________________
> users mailing list
> users at lists.mercurylang.org
> https://www.mercurylang.org/lists/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20160209/41321a7e/attachment.html>


More information about the users mailing list