Skip to content

Commit

Permalink
Add Ctype.duplicate_type support in OCaml 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Nov 10, 2024
1 parent 4f950ec commit cf275d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/debugger/inspect/ctype.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include Ocaml_common.Ctype

[%%if ocaml_version < (5, 3, 0)]
let duplicate_type = correct_levels
[%%endif]
2 changes: 1 addition & 1 deletion src/debugger/inspect/value_scope.ml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class local_scope_value ~scene ~frame ~kind () =
match typenv |> Typenv.find_value (Path.Pident id) with
| exception Not_found -> None
| { val_type; val_kind; _ } ->
let ty = Ctype.correct_levels val_type in
let ty = Ctype.duplicate_type val_type in
Some (Ident.name id, val_kind, ty, pos))
|> Array.of_seq,
match (frame.index, event.ev_kind) with
Expand Down

0 comments on commit cf275d4

Please sign in to comment.