From fd788655f35734a5b54c513265d888ca2c3b8d52 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sun, 19 Jan 2025 01:33:08 +0000 Subject: [PATCH] refactor: specialize string functions for opam's parser string cache do not rely on polymorphic hashing/comparison for strings Signed-off-by: Rudi Grinberg Signed-off-by: Rudi Grinberg --- vendor/opam-file-format/opamLexer.mll | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vendor/opam-file-format/opamLexer.mll b/vendor/opam-file-format/opamLexer.mll index 26b0228af12..ac7db37650f 100644 --- a/vendor/opam-file-format/opamLexer.mll +++ b/vendor/opam-file-format/opamLexer.mll @@ -82,8 +82,7 @@ let char_for_hexadecimal_code lexbuf i = Char.chr (val1 * 16 + val2) (* Some hash-consing for strings *) -module HS = - Weak.Make(struct include String let hash = Hashtbl.hash let equal = (=) end) +module HS = Weak.Make(String) let hm = HS.create 317