[m-dev.] Re: Calling an arbitrary predicate from mdb

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Dec 5 17:06:37 AEDT 1998


On 04-Dec-1998, Peter Schachte <pets at cs.mu.OZ.AU> wrote:
> On Thu, Dec 03, 1998 at 08:25:25PM +1100, Fergus Henderson wrote:
> > Yes.  A Mercury interface to dlopen(), dlsym(), etc. should be reasonably
> > straightforward, and could be very useful.
> 
> But how would one write a call to an unknown-at-compile-time
> predicate?

Well, the C interface to those things is not type-safe,
so a Mercury thin binding to those functions (which is
what I was suggesting as a first step) would not be
type-safe either. 

> Also, Ideally, one would like to use type classes to ensure that the
> predicates called and the data structures they returned have the
> appropriate interfaces.  What's needed is some kind of load-time
> interface checking mechanism.

That would be a nice second step.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh>  |   but source code lives forever"
PGP: finger fjh at 128.250.37.3        |     -- leaked Microsoft memo.



More information about the developers mailing list