diff options
Diffstat (limited to 'src/TranslateCore.ml')
-rw-r--r-- | src/TranslateCore.ml | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/TranslateCore.ml b/src/TranslateCore.ml index 047219ad..e77445cd 100644 --- a/src/TranslateCore.ml +++ b/src/TranslateCore.ml @@ -16,11 +16,16 @@ type type_context = C.type_context [@@deriving show] type fun_context = { fun_decls : A.fun_decl A.FunDeclId.Map.t; fun_infos : FA.fun_info A.FunDeclId.Map.t; - gid_conv : A.global_id_converter; } [@@deriving show] -type trans_ctx = { type_context : type_context; fun_context : fun_context } +type global_context = C.global_context [@@deriving show] + +type trans_ctx = { + type_context : type_context; + fun_context : fun_context; + global_context : global_context +} type pure_fun_translation = Pure.fun_decl * Pure.fun_decl list @@ -40,16 +45,16 @@ let fun_sig_to_string (ctx : trans_ctx) (sg : Pure.fun_sig) : string = let type_params = sg.type_params in let type_decls = ctx.type_context.type_decls in let fun_decls = ctx.fun_context.fun_decls in - let gid_conv = ctx.fun_context.gid_conv in - let fmt = PrintPure.mk_ast_formatter type_decls fun_decls gid_conv type_params in + let global_decls = ctx.global_context.global_decls in + let fmt = PrintPure.mk_ast_formatter type_decls fun_decls global_decls type_params in PrintPure.fun_sig_to_string fmt sg let fun_decl_to_string (ctx : trans_ctx) (def : Pure.fun_decl) : string = let type_params = def.signature.type_params in let type_decls = ctx.type_context.type_decls in let fun_decls = ctx.fun_context.fun_decls in - let gid_conv = ctx.fun_context.gid_conv in - let fmt = PrintPure.mk_ast_formatter type_decls fun_decls gid_conv type_params in + let global_decls = ctx.global_context.global_decls in + let fmt = PrintPure.mk_ast_formatter type_decls fun_decls global_decls type_params in PrintPure.fun_decl_to_string fmt def let fun_decl_id_to_string (ctx : trans_ctx) (id : A.FunDeclId.id) : string = |