[m-users.] Metaprogramming in Mercury
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 :) )
On 8 February 2016 at 22:28, Tomas By <tomas at basun.net> wrote:
> 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.
> 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
>> users mailing list
>> users at lists.mercurylang.org
> users mailing list
> users at lists.mercurylang.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users