
LOCAL_CALL                                              Chris Mellish, Feb 85

This library package provides a "fix" for some problems with Prolog modules.
It provides a predicate "local_call" which behaves like "call" except that
predicates are ALWAYS looked for in the module where the "local_call" is
textually placed, rather than in the module which is active when the call
takes place.

To use the library package:

    1. Load library MODULES (see *MODULES)

    2. Load library LOCAL_CALL

    3. Load your program, doctored as follows:

        a) After the 'module' goal for any module in which "local calls"
           are required, insert the goal:

            :- enable_local_calls.

        b) Replace uses of 'call' (or variables appearing as goals) by
           uses of 'local_call'. Note that this needs to be done for
           embedded goals in disjunctions and conjunctions as well.

Here is an example of 'local_call' in use:

 :- module m.

 :- export a/2.
 :- enable_local_calls.

 a(X,Y) :-
    T =.. [X|Y],
    local_call(Y).

 foo(1).
 foo(2).
 baz(3).
 baz(4).

 :- endmodule.

 ?- a(foo,[X]).

 X = 1?
 ..... (etc.)

--- File: local/plog/help/local_call
--- Distribution: all
--- University of Sussex Poplog LOCAL File ------------------------------
