[ Predicate Database and Compiler | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]

expand_goal(+Term, -TransTerm)

Apply goal inline expansion to Term
A callable term.
A variable or callable term.


Applies a goal inline expansion to Term, if any is visible in the caller module. If no inline declaration is visible, TransTerm is identical to Term.

Normally, goal inline expansion is performed implicitly by the compiler. For certain meta-programming applications (e.g. for writing other compilers) it can be performed explicitly using expand_goal/2. Goal inline expansion is the third transformation which is applied during the compilation process: macro expansion, then clause expansion, then goal inline expansion.

Modes and Determinism


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


    [eclipse 1]: lib(fd).

    [eclipse 5]: expand_goal(X#>Y, G).
    X = X
    Y = Y
    G = fd_arith : fd_gec(X, -1, Y, -1, 0)

See Also

inline / 2, portray / 3, expand_clause / 2