This is really a problem of a novice Ciao user. The toplevel/compiler within emacs environment gives me the following output:
?- append(A,B,[1,2,3]). {ERROR: user:append/3 - undefined predicate}
The toplevel acts, in many ways, as another module. So you have to explicitly load the modules containing the predicates you intend to use. In this case,
Ciao-Prolog 1.7 #132: Wed Oct 31 19:34:53 CET 2001 ?- use_module(library(lists)). Note: module already in executable
yes ?- append(A, B, [1,2,3]).
A = [], B = [1,2,3] ? ;
A = [1], B = [2,3] ? ;
A = [1,2], B = [3] ? ;
A = [1,2,3], B = [] ? ;
no ?-
Note the first "use_module".
Additionaly, if you load into the toplevel a module, say `f', which in turn uses another module, e.g., `lists', the module lists is not made automatically visible at the toplevel, even if it was already loaded.
MCL
________________________________________________________ Virtuosity is no big deal, if you don't mind practicing.