Fix bug in dependency analysis around scope call arguments

This commit is contained in:
Louis Gesbert 2023-10-13 15:09:00 +02:00
parent 61ec34e3d9
commit d09113163d
2 changed files with 2 additions and 1 deletions

View File

@ -1237,6 +1237,7 @@ let translate_program (prgm : 'm Scopelang.Ast.program) : 'm Ast.program =
def next_bind
in
let items = translate_defs top_ctx defs_ordering in
Expr.Box.assert_closed items;
{
code_items = Bindlib.unbox items;
decl_ctx;

View File

@ -86,7 +86,7 @@ let rec expr_used_defs e =
if TopdefName.path v <> [] then VMap.empty
else VMap.singleton (Topdef v) pos
| (EScopeCall { scope; _ }, m) as e ->
if ScopeName.path scope <> [] then VMap.empty
if ScopeName.path scope <> [] then recurse_subterms e
else VMap.add (Scope scope) (Expr.mark_pos m) (recurse_subterms e)
| EAbs { binder; _ }, _ ->
let _, body = Bindlib.unmbind binder in