diff options
author | Son HO | 2023-12-05 16:47:51 +0100 |
---|---|---|
committer | GitHub | 2023-12-05 16:47:51 +0100 |
commit | 4795e5f823bc89504855d8eb946b111d9314f4d5 (patch) | |
tree | 4c35c707e74c14ad7a554147cff20b2e17c28659 /compiler/Print.ml | |
parent | 789ba1473acd287814a0d659b5f5a0e480e4e9d7 (diff) | |
parent | a212ab42927e0f9ffa3ed0dfa0140b231e725008 (diff) |
Merge pull request #48 from AeneasVerif/son_closures
Prepare support for function pointers and closures
Diffstat (limited to '')
-rw-r--r-- | compiler/Print.ml | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/compiler/Print.ml b/compiler/Print.ml index 92ce6f23..0e2ec1fc 100644 --- a/compiler/Print.ml +++ b/compiler/Print.ml @@ -393,7 +393,6 @@ module Contexts = struct let global_decls = ctx.global_ctx.global_decls in let trait_decls = ctx.trait_decls_ctx.trait_decls in let trait_impls = ctx.trait_impls_ctx.trait_impls in - let generics = TypesUtils.empty_generic_params in let preds = TypesUtils.empty_predicates in { type_decls; @@ -401,7 +400,10 @@ module Contexts = struct global_decls; trait_decls; trait_impls; - generics; + regions = []; + types = []; + const_generics = []; + trait_clauses = []; preds; locals = []; } @@ -415,16 +417,6 @@ module Contexts = struct (* Below: it is always safe to omit fields - if an id can't be found at printing time, we print the id (in raw form) instead of the name it designates. *) - let generics : generic_params = - { - types = ctx.type_vars; - (* The regions have been transformed to region groups *) - regions = []; - const_generics = ctx.const_generic_vars; - (* We don't need the trait clauses so we initialize them to empty *) - trait_clauses = []; - } - in (* We don't need the predicates so we initialize them to empty *) let preds = empty_predicates in (* For the locals: we retrieve the information from the environment. @@ -444,7 +436,12 @@ module Contexts = struct global_decls; trait_decls; trait_impls; - generics; + types = ctx.type_vars; + (* The regions have been transformed to region groups *) + regions = []; + const_generics = ctx.const_generic_vars; + (* We don't need the trait clauses so we initialize them to empty *) + trait_clauses = []; preds; locals; } @@ -596,7 +593,7 @@ module EvalCtx = struct let fun_id_or_trait_method_ref_to_string (ctx : eval_ctx) (x : fun_id_or_trait_method_ref) : string = let env = eval_ctx_to_fmt_env ctx in - fun_id_or_trait_method_ref_to_string env x "..." + fun_id_or_trait_method_ref_to_string env x let statement_to_string (ctx : eval_ctx) (indent : string) (indent_incr : string) (e : statement) : string = |