]> Repositorios git - scryer-prolog.git/commitdiff
add expand_term/2
authorMark Thom <[email protected]>
Tue, 16 Oct 2018 02:07:48 +0000 (20:07 -0600)
committerMark Thom <[email protected]>
Tue, 16 Oct 2018 02:07:48 +0000 (20:07 -0600)
src/prolog/lib/builtins.pl

index a8a0023f99bfe07967cb9bc9173c11913ce03200..9ec86330adffe24a0c9bea3260b25c5e924e2b89 100644 (file)
@@ -6,7 +6,8 @@
        (=:=)/2, (-)/1, (>=)/2, (=<)/2, (,)/2, (->)/2, (;)/2, (=..)/2,
        (==)/2, (\==)/2, (@=<)/2, (@>=)/2, (@<)/2, (@>)/2, (=@=)/2,
        (\=@=)/2, (:)/2, call_with_inference_limit/3, catch/3,
-       current_prolog_flag/2, set_prolog_flag/2, term_variables/2,
+       current_prolog_flag/2, expand_term/2, set_prolog_flag/2,
+       term_variables/2,
        setup_call_cleanup/3, throw/1, true/0, false/0]).
 
 /* this is an implementation specific declarative operator used to implement call_with_inference_limit/3
@@ -205,6 +206,10 @@ get_args([Arg|Args], Func, I0, N) :-
     '$call_with_default_policy'(I1 is I0 + 1),
     '$call_with_default_policy'(get_args(Args, Func, I1, N)).
 
+% expand_term.
+
+expand_term(Term0, Term) :- '$expand_term'(Term0, Term).
+
 % term_variables.
 
 can_be(Type, Term) :- error:can_be(Type, Term).