From 0475ff127f34e803dc3bd86f6a839a8f4d525280 Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Wed, 21 Feb 2024 17:24:18 +0200 Subject: [PATCH] Add Type_abstract support in OCaml 5.2 --- src/debugger/inspect/value_basic.ml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/debugger/inspect/value_basic.ml b/src/debugger/inspect/value_basic.ml index 463bc61..003a8ef 100644 --- a/src/debugger/inspect/value_basic.ml +++ b/src/debugger/inspect/value_basic.ml @@ -81,7 +81,16 @@ let adopt scene typenv obj ty = type_manifest = Some body; type_params; _; - } -> ( + } [@if ocaml_version < (5, 2, 0)] -> ( + match Typenv.type_apply typenv type_params body ty_args with + | ty -> resolve_type ty + | exception Ctype.Cannot_apply -> ty) + | { + type_kind = Type_abstract _; + type_manifest = Some body; + type_params; + _; + } [@if ocaml_version >= (5, 2, 0)] -> ( match Typenv.type_apply typenv type_params body ty_args with | ty -> resolve_type ty | exception Ctype.Cannot_apply -> ty)