From 8d301a6fc24187f1fc3d8fa6a5c7f53e508099df Mon Sep 17 00:00:00 2001 From: Emin Arslan Date: Thu, 12 Feb 2026 18:32:36 +0300 Subject: [PATCH] scope_analysis: fix the handling of Lambda forms --- lib/compiler/scope_analysis.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/compiler/scope_analysis.ml b/lib/compiler/scope_analysis.ml index f4c4484..d25f305 100644 --- a/lib/compiler/scope_analysis.ml +++ b/lib/compiler/scope_analysis.ml @@ -87,7 +87,9 @@ let rec analyze tbl current = function | Set (sym, expr) -> let* inner = analyze tbl current expr in resolve_set tbl current sym inner - | Lambda (s, body) -> analyze tbl (s :: current) body + | Lambda (s, body) -> + let* body = (analyze tbl (s :: current) body) in + Ok (Lambda body) | Apply (f, e) -> let* f = analyze tbl current f in let* e = analyze tbl current e in