Skip to content

Commit

Permalink
Merge pull request ocaml-ppx#94 from kit-ty-kate/ocaml-5.2
Browse files Browse the repository at this point in the history
Add support for OCaml 5.2
  • Loading branch information
ejgallego committed May 15, 2024
1 parent 5804798 commit 067ecf7
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}

Expand Down
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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
------

Expand Down
2 changes: 1 addition & 1 deletion src/compat/gen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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)]) ]
Expand Down
12 changes: 12 additions & 0 deletions src/compat/types_type_kind_ge_502.ml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 067ecf7

Please sign in to comment.