[m-dev.] How to tell if a predicate is external

Ian MacLarty maclarty at cs.mu.OZ.AU
Tue Dec 6 04:40:02 AEDT 2005


On Tue, Dec 06, 2005 at 03:16:23AM +1100, Ian MacLarty wrote:
> On Tue, Dec 06, 2005 at 03:06:31AM +1100, Ian MacLarty wrote:
> > Hi,
> > 
> > Is there a way I can tell in the HLDS if a predicate is declared as 
> > :- external ?  I would have thought there was a marker for this, but
> > there doesn't appear to be.
> > 
> 
> Nevermind - I think I can use pred_info_import_status/2.
> 

On second thought, no that doesn't give me what I want. The
import_status for builin.unify in a module that calls builtin.unify is
imported(interface), but I want to know if the predicate is defined with
:- external.

Is this information available, or does it need to be written to the
interface files?  Is :- external only meant for Mercury developers
(it's not documented in the reference manual)?  In
that case it might be feasible to hard code what is defined externally.

The debugger needs to know what predicates are defined externally, so
that it knows not to expect events for those predicates.

Ian.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list