From jan@swi.psy.uva.nl  Thu Jan 20 14:38:54 2000
Received: from gollem.swi.psy.uva.nl (root@gollem [145.18.152.30])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id OAA14484;
	Thu, 20 Jan 2000 14:38:53 +0100 (MET)
Received: from localhost (localhost [[UNIX: localhost]])
	by gollem.swi.psy.uva.nl (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id OAA24513;
	Thu, 20 Jan 2000 14:38:54 +0100
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Organization: SWI, University of Amsterdam
To: Paul Singleton <p.singleton@keele.ac.uk>,
        SWI Prolog <prolog@swi.psy.uva.nl>
Subject: Re: more autoload verbosity please
Date: Thu, 20 Jan 2000 14:36:38 +0100
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
References: <38862B3C.B7C4A007@keele.ac.uk>
In-Reply-To: <38862B3C.B7C4A007@keele.ac.uk>
MIME-Version: 1.0
Message-Id: <00012014385401.22472@gollem>
Content-Transfer-Encoding: 8bit

On Wed, 19 Jan 2000, Paul Singleton wrote:
>I need to know which undefined predicate is causing a library
>to be autoloaded: I've enabled verbose_autoload, but that just
>tells me the pathname of the loaded file and its module.
>
>This is only a temporary requirement, so any workaround will
>be welcome.

It is more or less a temporary hack, but the following does your
job:

exception(undefined_predicate, Pred, _) :-
        format('Trapping undefined for ~w~n', [Pred]),
        fail.

You can mess around with the database defined in boot/autoload.pl
to print more info on what file it will autoload to for this
missing predicate.

	Regards --- Jan

