]> Repositorios git - scryer-prolog.git/commitdiff
expand attributed variable goals
authorMark Thom <[email protected]>
Wed, 3 Feb 2021 04:47:59 +0000 (21:47 -0700)
committerMark Thom <[email protected]>
Wed, 3 Feb 2021 04:47:59 +0000 (21:47 -0700)
src/loader.pl
src/machine/attributed_variables.pl

index 448960b9201bdd77bfe1ee13af258a73ba894326..b16150c6c453e954c6951bf748b126a8e5d88e6c 100644 (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
index b5049e3a0003be50e4e9d3386daf7040e79ccc24..3cd4c0f1768df4ac38f74851e6d5f66d07eda410 100644 (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([], _).