Skip to content

Commit

Permalink
deduplicate but do not sort anonymous variables in toplevel (#1196)
Browse files Browse the repository at this point in the history
  • Loading branch information
mthom committed Jan 16, 2022
1 parent 06abe23 commit 83378e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/machine/system_calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ impl MachineState {
let outcome = heap_loc_as_cell!(
iter_to_heap_list(
&mut self.heap,
seen_set.into_iter().rev(),
seen_set.into_iter(),
)
);

Expand Down
2 changes: 1 addition & 1 deletion src/toplevel.pl
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
% one layer of depth added for (=/2) functor
maplist(\Term^Vs^term_variables_under_max_depth(Term, 22, Vs), Equations, EquationVars),
append([AttrGoalVars | EquationVars], Vars1),
sort(Vars1, Vars2),
term_variables(Vars1, Vars2), % deduplicate vars of Vars1 but preserve their order.
charsio:extend_var_list(Vars2, VarList, NewVarList0, fabricated),
( bb_get('$first_answer', true) ->
write(' '),
Expand Down

0 comments on commit 83378e4

Please sign in to comment.