Cleanup tmp debug code

This commit is contained in:
Louis Gesbert 2023-08-31 10:11:45 +02:00
parent 8e33355ead
commit e75ea3da07
3 changed files with 1 additions and 29 deletions

View File

@ -1077,17 +1077,8 @@ let translate_program (prgm : 'm Scopelang.Ast.program) : 'm Ast.program =
Scopelang.Dependency.get_defs_ordering defs_dependencies
in
let decl_ctx = prgm.program_ctx in
Message.emit_debug "prog scopes: %a@ modules: %a"
(ScopeName.Map.format_keys ~pp_sep:Format.pp_print_space)
prgm.program_scopes
(ModuleName.Map.format (fun fmt prg ->
ScopeName.Map.format_keys ~pp_sep:Format.pp_print_space fmt
prg.Scopelang.Ast.program_scopes))
prgm.program_modules;
let sctx : 'm scope_sigs_ctx =
let process_scope_sig scope_name scope =
Message.emit_debug "process_scope_sig %a (%a)" ScopeName.format scope_name
ScopeName.format scope.Scopelang.Ast.scope_decl_name;
let scope_path = ScopeName.path scope_name in
let scope_ref =
if scope_path = [] then

View File

@ -1039,7 +1039,6 @@ let process_def
Ast.ScopeDef.Map.find def_key scope_ctxt.scope_defs_contexts
in
(* We add to the name resolution context the name of the parameter variable *)
Message.emit_debug "PROCESS_DEF %a@!" Ast.ScopeDef.format def_key;
let local_vars, param_uids =
process_rule_parameters ctxt (Mark.copy def.definition_name def_key) def
in
@ -1525,13 +1524,6 @@ let translate_program (ctxt : Name_resolution.context) (surface : S.program) :
| S.CodeBlock (block, _, _) -> process_code_block ctxt prgm block
| S.LawInclude _ | S.LawText _ -> prgm
in
Message.emit_debug "DESUGARED → prog scopes: %a@ modules: %a"
(ScopeName.Map.format_keys ~pp_sep:Format.pp_print_space)
desugared.Ast.program_scopes
(ModuleName.Map.format (fun fmt prg ->
ScopeName.Map.format_keys ~pp_sep:Format.pp_print_space fmt
prg.Ast.program_scopes))
desugared.Ast.program_modules;
let desugared =
List.fold_left
(fun acc (id, intf) ->
@ -1546,14 +1538,4 @@ let translate_program (ctxt : Name_resolution.context) (surface : S.program) :
})
desugared surface.S.program_modules
in
let desugared =
List.fold_left process_structure desugared surface.S.program_items
in
Message.emit_debug "DESUGARED2 → prog scopes: %a@ modules: %a"
(ScopeName.Map.format_keys ~pp_sep:Format.pp_print_space)
desugared.Ast.program_scopes
(ModuleName.Map.format (fun fmt prg ->
ScopeName.Map.format_keys ~pp_sep:Format.pp_print_space fmt
prg.Ast.program_scopes))
desugared.Ast.program_modules;
desugared
List.fold_left process_structure desugared surface.S.program_items

View File

@ -358,7 +358,6 @@ module Env = struct
{ t with toplevel_vars = A.TopdefName.Map.add v typ t.toplevel_vars }
let add_module modname ~module_env t =
Message.emit_debug "ADD MODULE %a" A.ModuleName.format modname;
{ t with modules = A.ModuleName.Map.add modname module_env t.modules }
let open_scope scope_name t =