summaryrefslogtreecommitdiff
path: root/compiler/Extract.ml
diff options
context:
space:
mode:
authorSon HO2024-03-17 05:10:36 +0100
committerGitHub2024-03-17 05:10:36 +0100
commitd56946242859e0d375c1d44585b9da6d5fbe94cb (patch)
tree4589586257210809913e225192a15464cb91851f /compiler/Extract.ml
parentc33a9807cf6aa21b2364449ee756ebf93de19eca (diff)
parentee3e26e7b639bc7282d0c3777f9460e975ef232f (diff)
Merge pull request #91 from AeneasVerif/son/hax
Prepare the merge in hax
Diffstat (limited to '')
-rw-r--r--compiler/Extract.ml6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/Extract.ml b/compiler/Extract.ml
index 46f6a1ca..a93ed6e4 100644
--- a/compiler/Extract.ml
+++ b/compiler/Extract.ml
@@ -326,11 +326,8 @@ and extract_App (ctx : extraction_ctx) (fmt : F.formatter) (inside : bool)
extract_adt_cons ctx fmt inside adt_cons_id qualif.generics args
| Proj proj ->
extract_field_projector ctx fmt inside app proj qualif.generics args
- | TraitConst (trait_ref, generics, const_name) ->
- let use_brackets = generics <> empty_generic_args in
- if use_brackets then F.pp_print_string fmt "(";
+ | TraitConst (trait_ref, const_name) ->
extract_trait_ref ctx fmt TypeDeclId.Set.empty false trait_ref;
- extract_generic_args ctx fmt TypeDeclId.Set.empty generics;
let name =
ctx_get_trait_const trait_ref.trait_decl_ref.trait_decl_id
const_name ctx
@@ -338,7 +335,6 @@ and extract_App (ctx : extraction_ctx) (fmt : F.formatter) (inside : bool)
let add_brackets (s : string) =
if !backend = Coq then "(" ^ s ^ ")" else s
in
- if use_brackets then F.pp_print_string fmt ")";
F.pp_print_string fmt ("." ^ add_brackets name))
| _ ->
(* "Regular" expression *)