In a module, a predicate is defined to be export: :- module(m1). :- export f/1. f(m1). This is then imported into another module: [eclipse 2]: module(m2). WARNING: creating a new module in module(m2) [m2 3]: import m1. In a third module, f/1 should not be accessable by trying to find it in m2, as it is not exported from there: [eclipse 5]: m2:f(X). calling an undefined procedure m2 : f(X) in module eclipse [eclipse 6]: [user]. g(X) :- m2:f(X). user compiled traceable 32 bytes in 0.00 seconds yes. [eclipse 7]: g(X). calling an undefined procedure m2 : f(X) in module eclipse This is as I expected. *However*, if in the eclipse module, I call f/1 before the compilation of g/1: [eclipse 9]: call(f(X))@m2. X = m1 yes. [eclipse 10]: g(X). calling an undefined procedure m2 : f(X) in module eclipse [eclipse 11]: [user]. g(X) :- m2:f(X). user compiled traceable 32 bytes in 0.00 seconds yes. [eclipse 12]: g(X). X = m1 yes. This last call to g(X) should not succeed!Received on Fri Feb 23 19:48:58 2001
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:04 PM GMT GMT