expand attributed variable goals

This commit is contained in:
Mark Thom
2021-02-02 21:47:59 -07:00
parent a2447ecaa3
commit e928a0aaea
2 changed files with 3 additions and 2 deletions

View File

@@ -460,7 +460,7 @@ expand_goal(UnexpandedGoals, Module, ExpandedGoals, HeadVars) :-
; Goals = (\+ Goals0) ->
expand_goal(Goals0, Module, Goals1, HeadVars),
ExpandedGoals = (\+ Goals1)
; predicate_property(Goals, meta_predicate(MetaSpecs)) ->
; predicate_property(Module:Goals, meta_predicate(MetaSpecs)) ->
expand_module_names(Goals, MetaSpecs, Module, ExpandedGoals, HeadVars)
; thread_goals(Goals, ExpandedGoals, (','))
; Goals = ExpandedGoals

View File

@@ -51,6 +51,7 @@ call_goals_0([Module-GoalList | GoalLists]) :-
call_goals_0([]).
call_goals_1([Goal | Goals], Module) :-
call(Module:Goal),
expand_goal(Goal, Module, Goal1), % TODO: remove this when goal expansions are added to call/N.
call(Module:Goal1),
call_goals_1(Goals, Module).
call_goals_1([], _).