Skip to content

Commit 0e22c28

Browse files
committed
document toposort bug
1 parent ec840e9 commit 0e22c28

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

HB/common/database.elpi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ toposort-proj.acc Proj ES Acc [A|In] Out :- std.do![
188188
pred topo-find-all i:B, o:A.
189189
topo-find-all B A :- std.do! [
190190
std.findall (topo-find B C_) L,
191+
% if there were dusplicates, we ensure we keep the most instantiated, eg
192+
% (triple m [X,Y] t) v.s. (triple m [a,b] t)
191193
std.assert! (std.forall L (x\ x = topo-find B A)) "topofind bad",
192194
].
193195

0 commit comments

Comments
 (0)