diff --git a/src/prolog/lib/freeze.pl b/src/prolog/lib/freeze.pl index 049e024b..cca3888d 100644 --- a/src/prolog/lib/freeze.pl +++ b/src/prolog/lib/freeze.pl @@ -21,16 +21,6 @@ freeze(X, Goal) :- put_atts(Fresh, frozen(Goal)), Fresh = X. -gather_freeze_goals(Attrs, _) --> - { var(Attrs) }, - !. -gather_freeze_goals([frozen(X) | _], Var) --> - [freeze(Var, X)], - { put_atts(Var, -frozen(_)) }, - !. -gather_freeze_goals([_ | Attrs], Var) --> - gather_freeze_goals(Attrs, Var). - -attribute_goals(X) --> - { '$get_attr_list'(X, Attrs) }, - gather_freeze_goals(Attrs, X). +attribute_goals(Var) --> + { get_atts(Var, frozen(Goals)) }, + [freeze(Var, Goals)]. diff --git a/src/prolog/machine/project_attributes.pl b/src/prolog/machine/project_attributes.pl index 3882181c..1c0690d5 100644 --- a/src/prolog/machine/project_attributes.pl +++ b/src/prolog/machine/project_attributes.pl @@ -63,7 +63,7 @@ call_query_var_goals([AttrVar|AttrVars], Module, Goals) :- call_attr_var_goals([], _, []). call_attr_var_goals([AttrVar|AttrVars], Module, Goals) :- - ( catch(Module:attribute_goals(AttrVar, Goals, RGoals), + ( catch(Module:attribute_goals(AttrVar, Goals, RGoals), E, '$print_attribute_goals_exception'(Module, E) )