summaryrefslogtreecommitdiff
path: root/compiler/Print.ml
diff options
context:
space:
mode:
authorGuillaume Boisseau2024-06-21 15:41:59 +0200
committerGitHub2024-06-21 15:41:59 +0200
commitc8ad44f287215c3c45e5a0f0540ef507b4916c7d (patch)
tree9dcfe67426cd7ae423c0205cee2298132f2fcdab /compiler/Print.ml
parentaa8e74197687ecc6d8f925babc8ba3cd6c739990 (diff)
parentb287f234695d9013cb74c99dcac46a9b5b334f7c (diff)
Merge pull request #253 from Nadrieril/merge-preds-into-params
Diffstat (limited to '')
-rw-r--r--compiler/Print.ml21
1 files changed, 9 insertions, 12 deletions
diff --git a/compiler/Print.ml b/compiler/Print.ml
index 8bd709d0..76793548 100644
--- a/compiler/Print.ml
+++ b/compiler/Print.ml
@@ -426,7 +426,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 preds = TypesUtils.empty_predicates in
{
type_decls;
fun_decls;
@@ -434,10 +433,7 @@ module Contexts = struct
trait_decls;
trait_impls;
regions = [];
- types = [];
- const_generics = [];
- trait_clauses = [];
- preds;
+ generics = TypesUtils.empty_generic_params;
locals = [];
}
@@ -450,8 +446,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. *)
- (* 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.
Note that the locals don't need to be ordered based on their indices.
*)
@@ -469,13 +463,16 @@ module Contexts = struct
global_decls;
trait_decls;
trait_impls;
- 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;
+ generics =
+ {
+ TypesUtils.empty_generic_params with
+ types = ctx.type_vars;
+ const_generics = ctx.const_generic_vars;
+ (* We don't need the trait clauses so we initialize them to empty *)
+ trait_clauses = [];
+ };
locals;
}