move call_residue_vars/2 from atts.pl to iso_ext.pl
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
:- module(atts, [op(1199, fx, attribute),
|
||||
call_residue_vars/2,
|
||||
term_attributed_variables/2]).
|
||||
|
||||
:- use_module(library(dcgs)).
|
||||
@@ -111,13 +110,5 @@ user:goal_expansion(Term, M:get_atts(Var, Attr)) :-
|
||||
nonvar(Term),
|
||||
Term = get_atts(Var, M, Attr).
|
||||
|
||||
:- meta_predicate call_residue_vars(0, ?).
|
||||
|
||||
call_residue_vars(Goal, Vars) :-
|
||||
can_be(list, Vars),
|
||||
'$get_attr_var_queue_delim'(B),
|
||||
call(Goal),
|
||||
'$get_attr_var_queue_beyond'(B, Vars).
|
||||
|
||||
term_attributed_variables(Term, Vars) :-
|
||||
'$term_attributed_variables'(Term, Vars).
|
||||
|
||||
@@ -9,6 +9,7 @@ but they're not part of the ISO Prolog standard at the moment.
|
||||
bb_put/2,
|
||||
call_cleanup/2,
|
||||
call_with_inference_limit/3,
|
||||
call_residue_vars/2,
|
||||
forall/2,
|
||||
partial_string/1,
|
||||
partial_string/3,
|
||||
@@ -397,3 +398,11 @@ copy_term(Term, Copy, Gs) :-
|
||||
Gs = []
|
||||
; true
|
||||
).
|
||||
|
||||
:- meta_predicate call_residue_vars(0, ?).
|
||||
|
||||
call_residue_vars(Goal, Vars) :-
|
||||
can_be(list, Vars),
|
||||
'$get_attr_var_queue_delim'(B),
|
||||
call(Goal),
|
||||
'$get_attr_var_queue_beyond'(B, Vars).
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/**/
|
||||
|
||||
:- use_module(library(format)).
|
||||
:- use_module(library(dcgs)).
|
||||
:- use_module(library(format)).
|
||||
:- use_module(library(lists)).
|
||||
:- use_module(library(debug)).
|
||||
:- use_module(library(atts)).
|
||||
:- use_module(library(iso_ext)).
|
||||
:- use_module(library(dif)).
|
||||
|
||||
% Tests from https://www.complang.tuwien.ac.at/ulrich/iso-prolog/dif
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/**/
|
||||
|
||||
:- use_module(library(iso_ext)).
|
||||
:- use_module(library(format)).
|
||||
:- use_module(library(dcgs)).
|
||||
:- use_module(library(lists)).
|
||||
:- use_module(library(debug)).
|
||||
:- use_module(library(atts)).
|
||||
|
||||
:- use_module(library(when)).
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
:- module('$toplevel', []).
|
||||
|
||||
:- use_module(library(atts), [call_residue_vars/2]).
|
||||
:- use_module(library(charsio)).
|
||||
:- use_module(library(error)).
|
||||
:- use_module(library(files)).
|
||||
@@ -186,7 +185,7 @@ submit_query_and_print_results_(Term, VarList) :-
|
||||
bb_put('$report_all', false),
|
||||
bb_put('$report_n_more', 0),
|
||||
expand_goal(Term, user, Term0),
|
||||
atts:call_residue_vars(user:Term0, AttrVars),
|
||||
call_residue_vars(user:Term0, AttrVars),
|
||||
write_eqs_and_read_input(B, VarList, AttrVars),
|
||||
!.
|
||||
submit_query_and_print_results_(_, _) :-
|
||||
@@ -451,4 +450,3 @@ print_exception_with_check(E) :-
|
||||
% is expected to be printed instead.
|
||||
; print_exception(E)
|
||||
).
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use_module(library(dif)).
|
||||
use_module(library(atts)).
|
||||
use_module(library(iso_ext)).
|
||||
-X\=X.
|
||||
-X=X.
|
||||
dif(-X,X).
|
||||
|
||||
Reference in New Issue
Block a user