Skip to content

baml-language-source-e850d92a52c72663b633d643cb45339099a6430a

@2kai2kai2 2kai2kai2 tagged this 30 Jul 18:16
Lambdas use their parent function's `TypeExpr`/`TypeRef` arenas, now
have a separate `LambdaDef` AST type and generally lower in their
surrounding function rather than as a separate system. This improves the
internal representation and also is part of the groundwork for a
rust-like inference system.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Improvements**
* Improved handling of lambda expressions and nested test bodies for
more accurate type inference, diagnostics, and control-flow analysis.
* Ensured exceptions raised inside unused lambdas do not incorrectly
affect the enclosing function.
* Improved code navigation, local-variable resolution, inlay hints,
completions, and usage tracking within lambdas.
* Added structural expression traversal to improve analysis accuracy and
consistency.

* **Documentation**
* Updated compiler architecture documentation to explain lambda-body
representation and incremental inference behavior.

* **Tests**
* Added coverage for traversal completeness and lambda exception
handling.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Assets 2
Loading