Skip to content

Commit

Permalink
facts: avoid generating dummy And facts
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamhm committed Sep 3, 2024
1 parent ed93fb3 commit 86b01a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10091,6 +10091,9 @@ a.types[i], b.types[i]), }
FACT_TRUTHY = TruthyFact({})

facts_and = function(w, f1, f2)
if not f1 and not f2 then
return
end
return AndFact({ f1 = f1, f2 = f2, w = w })
end

Expand Down
3 changes: 3 additions & 0 deletions tl.tl
Original file line number Diff line number Diff line change
Expand Up @@ -10091,6 +10091,9 @@ do
FACT_TRUTHY = TruthyFact {}

facts_and = function(w: Where, f1: Fact, f2: Fact): Fact
if not f1 and not f2 then
return
end
return AndFact { f1 = f1, f2 = f2, w = w }
end

Expand Down

0 comments on commit 86b01a7

Please sign in to comment.