From bc4f744ae3de4b5e6d748a48da785435c87637f9 Mon Sep 17 00:00:00 2001 From: Kate Date: Fri, 29 Mar 2024 17:42:12 +0000 Subject: [PATCH 1/2] Add support for OCaml 5.2 --- src/compat/gen.ml | 2 +- src/compat/types_type_kind_ge_502.ml | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 src/compat/types_type_kind_ge_502.ml diff --git a/src/compat/gen.ml b/src/compat/gen.ml index f2ba26b..9a6c75a 100644 --- a/src/compat/gen.ml +++ b/src/compat/gen.ml @@ -14,7 +14,7 @@ let make_version ~version f_prefix = let include_table = [ ("types_module_type", [(4, 10); (4, 8)]) ; ("types_signature_item", [(4, 8)]) - ; ("types_type_kind", [(4, 13)]) + ; ("types_type_kind", [(5, 2); (4, 13)]) ; ("init_path", [(4, 9)]) ; ("env_lookup", [(4, 10)]) ; ("types_desc", [(4, 14)]) ] diff --git a/src/compat/types_type_kind_ge_502.ml b/src/compat/types_type_kind_ge_502.ml new file mode 100644 index 0000000..4343a13 --- /dev/null +++ b/src/compat/types_type_kind_ge_502.ml @@ -0,0 +1,12 @@ +type ('lbl, 'cstr) type_kind_412 = + | Type_abstract + | Type_record of 'lbl list * Types.record_representation + | Type_variant of 'cstr list + | Type_open + +let migrate_type_kind : + ('lbl, 'cstr) Types.type_kind -> ('lbl, 'cstr) type_kind_412 = function + | Type_abstract _ -> Type_abstract + | Type_record (lbl, repr) -> Type_record (lbl, repr) + | Type_variant (cstr, _) -> Type_variant cstr + | Type_open -> Type_open From db072c9b0278f7fc08580f1437723880ba5eae6d Mon Sep 17 00:00:00 2001 From: Kate Date: Mon, 1 Apr 2024 11:31:02 +0100 Subject: [PATCH 2/2] Update changelog --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index b058076..35b9422 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -14,6 +14,8 @@ Unreleased type%import loc = Location.t ``` + * Support for OCaml 5.2 (#94, @kit-ty-kate) + 1.10.0 ------