From 5b492682a76608a2d1ab036204a41e1e3fb817dd Mon Sep 17 00:00:00 2001 From: Yazhou Tang Date: Wed, 25 Feb 2026 20:10:40 +0800 Subject: [PATCH] Extend Instruct.compilation_env heap support to OCaml 4.14.3+ --- src/debugger/inspect/eval.ml | 2 +- src/debugger/inspect/value_scope.ml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/debugger/inspect/eval.ml b/src/debugger/inspect/eval.ml index 6aff370..950fa9e 100644 --- a/src/debugger/inspect/eval.ml +++ b/src/debugger/inspect/eval.ml @@ -1,6 +1,6 @@ open Ground -[%%if ocaml_version >= (5, 2, 0)] +[%%if ocaml_version >= (5, 2, 0) || (ocaml_version >= (4, 14, 3) && ocaml_version < (5, 0, 0))] let ident_find_same_heap id (compenv: Instruct.compilation_env) = match compenv.ce_closure with | Not_in_closure -> raise Not_found diff --git a/src/debugger/inspect/value_scope.ml b/src/debugger/inspect/value_scope.ml index 177905c..9e564bd 100644 --- a/src/debugger/inspect/value_scope.ml +++ b/src/debugger/inspect/value_scope.ml @@ -11,7 +11,7 @@ class virtual scope_value = method! num_named = -1 end -[%%if ocaml_version >= (5, 2, 0)] +[%%if ocaml_version >= (5, 2, 0) || (ocaml_version >= (4, 14, 3) && ocaml_version < (5, 0, 0))] let iter_compenv_heap f (compenv: Instruct.compilation_env) = match compenv.ce_closure with | Not_in_closure -> ()