diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index a78c930..83e5a9d 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -2,9 +2,9 @@ name: Build and Test on: push: - branches: [ master ] + branches: [ master, v1.x ] pull_request: - branches: [ master ] + branches: [ master, v1.x ] jobs: build: @@ -26,6 +26,9 @@ jobs: - 4.12.x - 4.13.x - 4.14.x + - 5.0.x + - 5.1.x + - 5.2.x runs-on: ${{ matrix.os }} diff --git a/CHANGES.md b/CHANGES.md index 4005fd9..4a09d67 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,9 @@ +1.11.0 +------ + + * Support for OCaml 5.2 (#94, @kit-ty-kate, backport to 1.x by + @ejgallego #97) + 1.10.0 ------ 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