From: Mark Thom Date: Sun, 26 Feb 2023 23:29:39 +0000 (-0700) Subject: third argument of copy_term should be instantiated as a list (#1747) X-Git-Tag: v0.9.2~173 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=3286e78cd2057a407dcfc54a74835854f0abb9dc;p=scryer-prolog.git third argument of copy_term should be instantiated as a list (#1747) --- diff --git a/src/machine/project_attributes.pl b/src/machine/project_attributes.pl index 59ad0790..20a19e97 100644 --- a/src/machine/project_attributes.pl +++ b/src/machine/project_attributes.pl @@ -111,7 +111,11 @@ delete_all_attributes_from_var(V) :- '$delete_all_attributes_from_var'(V). copy_term(Term, Copy, Gs) :- can_be(list, Gs), - findall(Term-Rs, term_residual_goals(Term,Rs), [Copy-Gs]). + findall(Term-Rs, term_residual_goals(Term,Rs), [Copy-Gs]), + ( var(Gs) -> + Gs = [] + ; true + ). term_residual_goals(Term,Rs) :- '$term_attributed_variables'(Term, Vs),