OK.
So I should not be thinking that because I loaded the libary(clpfd)
from my module my_clpfd
the predicates in library(clpfd)
are accessible at the top level, user
.
Thanks.
EDIT
For others also curious about understanding this.
Welcome to SWI-Prolog (threaded, 64 bits, version 8.3.25)
...
?- current_predicate(Module:in/N_).
false.
?- X in 1..2.
ERROR: Syntax error: Operator expected
ERROR: X
ERROR: ** here **
ERROR: in 1..2 .
?- working_directory(_,'C:/Users/Eric/Documents/Projects/SWI-Prolog/XYZ').
true.
?- [my_clpfd].
true.
?- current_predicate(Module:in/N_).
Module = clpfd,
N_ = 2 ;
Module = my_clpfd,
N_ = 2 ;
false.
?- X in 1..2.
ERROR: Syntax error: Operator expected
ERROR: X
ERROR: ** here **
ERROR: in 1..2 .
?- use_module(library(clpfd)).
true.
?- current_predicate(Module:in/N_).
Module = user,
N_ = 2 ;
Module = clpfd,
N_ = 2 ;
Module = my_clpfd,
N_ = 2 ;
false.
?- X in 1..2.
X in 1..2.
Also see:
Properties of modules and predicates
Interacting with modules from the top level