On 24/10/2012 01:06, Paulo Moura wrote: ... > [eclipse 28]: create_module(n, [], []). > > Yes (0.00s cpu) > [eclipse 29]: assert(bar(99)) @ n. > > Yes (0.00s cpu) > [eclipse 30]: call(bar(X)) @ n. > calling an undefined procedure true in module n > Abort > >>From the manual: > > create_module(Module) :- > create_module(Module, [], eclipse_language). > > Thus, it seems my mistake was to omit the "eclipse_language" in the imports argument. Whether it's your mistake is debatable ;) create_module(m,[],[]) makes a really empty module, i.e. one that doesn't even have any built-in predicates visible, in particular not true/0. If assert/1 didn't turn bar(X) into (bar(X):-true) your example would work anyway. In fact, it works if you use compile_term/1 instead of assert/1... -- JoachimReceived on Tue Oct 23 2012 - 23:19:15 CEST
This archive was generated by hypermail 2.2.0 : Thu Oct 25 2012 - 06:14:16 CEST