diff --git a/compiler/heptagon/parsing/hept_scoping.ml b/compiler/heptagon/parsing/hept_scoping.ml index 65d057e..80991e0 100644 --- a/compiler/heptagon/parsing/hept_scoping.ml +++ b/compiler/heptagon/parsing/hept_scoping.ml @@ -532,7 +532,6 @@ let translate_program p = | Ptype t -> Heptagon.Ptype (translate_typedec t) | Pnode n -> Heptagon.Pnode (translate_node n) in - List.iter open_module p.p_opened; let desc = List.map translate_program_desc p.p_desc in { Heptagon.p_modname = Names.modul_of_string p.p_modname; Heptagon.p_opened = p.p_opened; diff --git a/compiler/heptagon/parsing/hept_static_scoping.ml b/compiler/heptagon/parsing/hept_static_scoping.ml index aa8e2a8..8d77704 100644 --- a/compiler/heptagon/parsing/hept_static_scoping.ml +++ b/compiler/heptagon/parsing/hept_static_scoping.ml @@ -67,9 +67,14 @@ let const_dec funs local_const cd = add_const c_name (Signature.mk_const_def Types.Tinvalid (Initial.mk_static_string "invalid")); cd, local_const +let interface_desc _ local_const id = match id with + | Iopen n -> open_module n; id, local_const + | _ -> raise Errors.Fallback + let program p = let funs = { Hept_parsetree_mapfold.defaults with node_dec = node; exp = exp; static_exp = static_exp; const_dec = const_dec } in + List.iter open_module p.p_opened; let p, _ = Hept_parsetree_mapfold.program_it funs Names.NamesSet.empty p in p