reexported pred. inaccessible (0909)

From: Kish Shen <k.shen_at_icparc.ic.ac.uk>
Date: Tue 20 Mar 2001 03:25:48 PM GMT
Message-ID: <3AB7767C.DC5A27E1@icparc.ic.ac.uk>
A reexported predicate is not accessible under the following
circumstances:

[eclipse 1]: [user].

 :- module(m1).
 
 :- export a/1.
 
 a(m1).
 
 :- module(m2).


If the user now makes a compiled call to the as yet non-existing a/1 in
m2:


[eclipse 2]: [user].
 t(X) :- m2:a(X).
 user       compiled traceable 32 bytes in 0.00 seconds

yes.
[eclipse 3]: t(X).
calling an undefined procedure m2 : a(X) in module eclipse

The undefined procedure error is raised as expected.
However, if m1 is now reexported from m2:
[eclipse 4]: module(m2).
[m2 5]: reexport m1.

yes.
[m2 6]: module(eclipse).
[eclipse 7]: [user].
 t(X) :- m2:a(X).
 user       compiled traceable 32 bytes in 0.00 seconds

yes.
[eclipse 8]: t(X).
calling an undefined procedure m1 : a(X) in module eclipse

the newly compiled t/1 still cannot access a/1 (note m1 is reported as
the module).

but a direct call works correctly:

[eclipse 12]: m2:a(X).

X = m1
yes.
[eclipse 13]: 

(this bug might be related to 0904)
Received on Tue Mar 20 15:25:48 2001

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:05 PM GMT GMT