From: Mark Thom Date: Wed, 3 Feb 2021 04:47:59 +0000 (-0700) Subject: expand attributed variable goals X-Git-Tag: v0.9.0~150^2~67^2 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=e928a0aaea3c7fe23856fd437cf1bfd1cb76865b;p=scryer-prolog.git expand attributed variable goals --- diff --git a/src/loader.pl b/src/loader.pl index 448960b9..b16150c6 100644 --- a/src/loader.pl +++ b/src/loader.pl @@ -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 diff --git a/src/machine/attributed_variables.pl b/src/machine/attributed_variables.pl index b5049e3a..3cd4c0f1 100644 --- a/src/machine/attributed_variables.pl +++ b/src/machine/attributed_variables.pl @@ -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([], _).