Explicit module scoping

From: Andrew John Sadler <ajs2_at_icparc.ic.ac.uk>
Date: Fri 24 Aug 2001 05:16:19 PM GMT
Message-Id: <E15aKZ8-0000Fq-00@ilford.icparc.ic.ac.uk>
The following code fails, but with a strange error...

Code:
> go:-
> 	ic:(X =:= 3.4),
>	writeln(X).
> 
> :-lib(ic).
> ?- go.

Error:
> Definition of =:=/2 in module ic is incompatible with call in module eclipse
> calling an undefined procedure X =:= 3.4 in module eclipse
>
> *** compilation aborted
> 	before line 8 in the file /a/breeze/extra5/ajs2/Tests/IC/module_failure.pl

The question I have is, should go be allowed to compile successfully given that ic has not been loaded yet, and if it should (as it does), shouldn't the module expansion then be done at run-time?

Andrew
Received on Fri Aug 24 18:16:20 2001

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