Skip to content

Commit 2adc98a

Browse files
Subsume lambda functions after replacing
1 parent 894512f commit 2adc98a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

docs/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ _This project uses semantic versioning_
88
- Add support for subsuming rewrite generated by default function and method definitions
99
- Add better error message when using @function in class (thanks @shinawy)
1010
- Add error method if `@method` decorator is in wrong place
11+
- Subsumes lambda functions after replacing
1112

1213
## 8.0.1 (2024-10-24)
1314

python/egglog/builtins.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,8 @@ def _convert_function(a: FunctionType) -> UnstableFn:
532532
transformed_fn = functionalize(a, value_to_annotation)
533533
assert isinstance(transformed_fn, partial)
534534
return UnstableFn(
535-
function(ruleset=get_current_ruleset(), use_body_as_name=True)(transformed_fn.func), *transformed_fn.args
535+
function(ruleset=get_current_ruleset(), use_body_as_name=True, subsume=True)(transformed_fn.func),
536+
*transformed_fn.args,
536537
)
537538

538539

0 commit comments

Comments
 (0)