module(eclipse) + external prediate = warning

From: Ulrich Scholz <scholz_at_inferenzsysteme.informatik.tu-darmstadt.de>
Date: Mon 13 Jan 2003 01:31:43 PM GMT
Message-ID: <20030113133143.GA13956@kiwi.intellektik.informatik.tu-darmstadt.de>
Hi everybody,

an answer to an earlier question suggested to turn my eclipse files into a
module 

>  A better solution is to turn your file into a module, i.e.  add a :-
>  module(mymodule).  directive to it.  Then the module will be automatically
>  erased before every recompilation.  If you don't want to bother learning
>  about modules, you can choose 'eclipse' as the module name, then you should
>  see no further difference in behaviour.

It seems as if I've found a difference: I get a warning for external
predicates.  As this is not an error, I can live with it.  On the other hand,
I use quite a few external predicates, so the false warnings tend to hide
"real" warnings and errors.  

How can I use :- module(...) and prevent the "false" warnings at the same
time?

Uli


A small example:

%
:- external(tim_read_input / 2).
:- module(eclipse).

init :- 
    load("tim_dkel.so"),
    external(tim_read_input / 2, p_tim_read_input),
    tim_read_input("foo", "bar").
%

Loading this file gives 
td.ecl     compiled traceable 168 bytes in 0.01 seconds
WARNING: predicate used but not declared or defined in tim_read_input / 2 in module eclipse

It compiles fine without the line ":- module(eclipse).".  The order of the
first two lines does not matter.

-- 
Ulrich Scholz

scholz@informatik.tu-darmstadt.de
http://www.intellektik.informatik.tu-darmstadt.de/~scholz
Received on Mon Jan 13 15:26:34 2003

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:21 PM GMT GMT