
tool_body(++PredSpecI, -PredSpecB, -Module)

   Succeeds if PredSpecI is a tool interface procedure, PredSpecB is its body
procedure, and Module the module where it is defined.



Arguments
   PredSpecI           Expression of the form Atom/Integer.
   PredSpecB           Expression of the form Atom/Integer.
   Module              Atom or variable.

Type
   Modules

Description
   To a given tool interface procedure it finds the corresponding body
   procedure and the module where it is defined.




Modes and Determinism
   tool_body(++, -, -) is det

Modules
   This predicate is sensitive to its module context (tool predicate, see @/2).

Exceptions
     4 --- PredSpecI is not instantiated.
     5 --- Either PredSpecI or PredSpecB is instantiated, but not to    the form Atom/Integer.
    91 --- PredSpecI is not a tool interface procedure.

Examples
   
Success:
      [eclipse]: tool_body(write/1, P, M), (import P from M).
      P = write_ / 2             % find the body
      M = sepia_kernel           %   procedure and
      yes.                       %   import it

Fail:
      tool_body(write/1, true/0, M).

Error:
      tool_body(L, P, M).                   (Error 4).
      tool_body("current_functor/1", P, M). (Error 5).
      tool_body(current_functor/1, P, M).   (Error 91).





See Also
   tool / 2
