Node:Use of Modules, Next:Super and Sub, Previous:Differential Inheritance, Up:Obj Hierarchies
In SICStus Objects, the visible predicates of the source module
(context) for the object definition may be called in the body of a
method. (The :
prefix is used to distinguish such calls from
method calls.) Any (:
prefixed) directives occurring among
the method-clauses are also executed in the same source module. For
example, to import into the source module and call the public
predicates of a module, the built-in predicate use_module/2
and
its variants may be used:
some_object :: { :- :use_module(library(lists), [append/3]) & double_list(X, XX) :- :append(X,X,XX) }.