summaryrefslogtreecommitdiff
path: root/compiler/ExtractBase.ml
diff options
context:
space:
mode:
authorSon Ho2023-11-20 21:58:25 +0100
committerSon Ho2023-11-20 21:58:25 +0100
commit672ceef25203ebd5fcf5a55e294a4ebfe65648d6 (patch)
treeed1f2e69fe173e25b6c137c350e87a855b513e46 /compiler/ExtractBase.ml
parent4a3779de578cebe01143bb18d295457107be1e3a (diff)
Use the name matcher implemented in Charon
Diffstat (limited to 'compiler/ExtractBase.ml')
-rw-r--r--compiler/ExtractBase.ml3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/ExtractBase.ml b/compiler/ExtractBase.ml
index ae5a9a22..f1ba35a2 100644
--- a/compiler/ExtractBase.ml
+++ b/compiler/ExtractBase.ml
@@ -1085,8 +1085,7 @@ let ctx_add_global_decl_and_body (def : A.global_decl) (ctx : extraction_ctx) :
(* Check if the global corresponds to an assumed global that we should map
to a custom definition in our standard library (for instance, happens
with "core::num::usize::MAX") *)
- let sname = name_to_simple_name def.name in
- match SimpleNameMap.find_opt sname builtin_globals_map with
+ match match_name_find_opt ctx.trans_ctx def.name builtin_globals_map with
| Some name ->
(* Yes: register the custom binding *)
ctx_add decl name ctx