From 9535f7384af4046307d80205e554a1962fae5200 Mon Sep 17 00:00:00 2001 From: Vincent Balat Date: Fri, 8 Mar 2024 16:15:09 +0100 Subject: [PATCH 1/2] Update to OCaml 5.2 --- CHANGES | 3 +++ src/ppx/ppx_eliom_utils.ml | 12 ++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index f5b9afd65..4e2dcf1f3 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +===== dev ===== +* Update to OCaml 5.2 + ===== 10.4.0 (2024-03-22) ===== * Basic client-server distillery template: sqlite is now the default backend * Basic template now has license unlicense diff --git a/src/ppx/ppx_eliom_utils.ml b/src/ppx/ppx_eliom_utils.ml index 2978abe2e..c5df7d6dd 100644 --- a/src/ppx/ppx_eliom_utils.ml +++ b/src/ppx/ppx_eliom_utils.ml @@ -318,7 +318,7 @@ module Cmo = struct let events = lazy (load ()) - let label_of_string s = + let[@ocaml.warning "-32"] label_of_string s = if s = "" then Asttypes.Nolabel else if s.[0] = '?' @@ -351,7 +351,15 @@ module Cmo = struct let rec type_of_out_type ty = match ty with | Otyp_var (_, s) -> Typ.var (var s) - | Otyp_arrow (lab, ty1, ty2) -> + | ((Otyp_arrow (lab, ty1, ty2)) [@if ocaml_version >= (5, 2, 0)]) -> + let lab = + match lab with + | Nolabel -> Nolabel + | Labelled lab -> Labelled lab + | Optional lab -> Optional lab + in + Typ.arrow lab (type_of_out_type ty1) (type_of_out_type ty2) + | ((Otyp_arrow (lab, ty1, ty2)) [@if ocaml_version < (5, 2, 0)]) -> Typ.arrow (label_of_string lab) (type_of_out_type ty1) (type_of_out_type ty2) | Otyp_tuple tyl -> Typ.tuple (List.map type_of_out_type tyl) From 939b6115c23a0bc47ef72e86a425f640d0105270 Mon Sep 17 00:00:00 2001 From: Vincent Balat Date: Mon, 8 Apr 2024 14:21:18 +0200 Subject: [PATCH 2/2] 10.4.1 --- CHANGES | 4 ++-- dune-project | 2 +- eliom.opam | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index 4e2dcf1f3..56732ac7d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,5 @@ -===== dev ===== -* Update to OCaml 5.2 +===== 10.4.1 ===== +* Update to OCaml 5.2 (thanks to Kate Deplaix) ===== 10.4.0 (2024-03-22) ===== * Basic client-server distillery template: sqlite is now the default backend diff --git a/dune-project b/dune-project index 55a35bf5e..3a44565db 100644 --- a/dune-project +++ b/dune-project @@ -1,7 +1,7 @@ (lang dune 3.6) (name eliom) -(version 10.4.0) +(version 10.4.1) (maintainers dev@ocsigen.org) (authors dev@ocsigen.org) (license "LGPL-2.1-only WITH OCaml-LGPL-linking-exception") diff --git a/eliom.opam b/eliom.opam index f3721b571..7f7fd4183 100644 --- a/eliom.opam +++ b/eliom.opam @@ -1,6 +1,6 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" -version: "10.4.0" +version: "10.4.1" synopsis: "Advanced client/server Web and mobile framework" description: """ Eliom is a framework for implementing Web sites and client/server Web and mobile applications.