19008b5d3e
The type checker incorrectly inferred `Any` for lambda parameters when a `Program` node was involved, preventing optimizations like constant folding. This was because the `check_params_tuple` function was resolving `TypeVar` to `StaticType::Any` instead of propagating the type variable. This commit addresses the issue by: - Explicitly wrapping the bound AST in a parameterless lambda within `compile_pipeline`. This ensures that the type checker always receives a `Lambda` node, even if the original input was a `Program` node. - Adding debug logging to the type checker to help diagnose similar issues in the future. Additionally, the commit fixes a bug where `parser.parse_program()` was used instead of `parser.parse_expression()`, which would consume the entire input and prevent checking for trailing expressions.