[m-users.] Debugging with foreign types

Zoltan Somogyi zoltan.somogyi at runbox.com
Sun May 24 20:44:10 AEST 2015



On Sat, 23 May 2015 13:13:18 +0100, matthias.guedemann at googlemail.com (Matthias Güdemann) wrote:
> But using queries is a good idea to explore a bit.

Unfortunately, using queries does not help the problem at hand.

Mdb implements queries by writing out a small Mercury program,
compiling it, dynamically linking it into the running program (the
one being debugged), executing it, then unlinking that small program.

When the query involves Mercury terms, this works fine. But if you
want to pass a value of a foreign type to the query, then for each
foreign type, the programmer would have to supply not just an
unparser for the type (to allow the creation of the text of the query
program), but also a parser (so that the Mercury code of the query
program could give that value back to foreign code).

Using queries thus makes the problem harder to solve, not easier.

Zoltan.





More information about the users mailing list