user:term_expansion/3¶
cleanup ensure loaded and recover some data-base space.
%%:- ( recorded('$lf_loaded',,R), erase(R), fail ; true ).%:- ( recorded('$module',,R), erase(R), fail ; true ). moved this to init_gc in gc.c to separate the alpha%% :- set_prolog_flag(gc,on).
user:term_expansion( T,- X)*
also available CurrentModule:term_expansion( T,- X),
This user-defined predicate is called by expand_term//33
to preprocess all terms read when consulting a file. If it succeeds:
-
If X is of the form
:- G
or?- G
, it is processed as a directive. -
If X is of the form
$source_location
( File, Line): Clauseit is processed as if from
Fileand line
Line`. -
If X is a list, all terms of the list are asserted or processed as directives.
-
The term X is asserted instead of T.