sort attribute goals before deduplicating them linearly
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
:- use_module(library(control), [(\=)/2]).
|
||||
:- use_module(library(dif)).
|
||||
|
||||
/* in essence, '$reify_switch'(T, Then_0, Else_0) is semantically this:
|
||||
/* in essence, '$reify_switch'(T, Then_0, Else_0) is semantically this,
|
||||
( T == true -> call(Then_0)
|
||||
; T == false -> call(Else_0)
|
||||
; nonvar(T) -> throw(error(type_error(boolean, T), _))
|
||||
|
||||
@@ -162,6 +162,7 @@ impl MachineState {
|
||||
return;
|
||||
}
|
||||
|
||||
attr_goals.sort_unstable_by(|a1, a2| self.compare_term_test(a1, a2));
|
||||
self.term_dedup(&mut attr_goals);
|
||||
|
||||
let mut output = PrinterOutputter::new();
|
||||
|
||||
Reference in New Issue
Block a user