Skip to content

Commit

Permalink
Merge pull request #789 from ocsigen/ocaml5.2
Browse files Browse the repository at this point in the history
Update to OCaml 5.2
  • Loading branch information
balat authored Apr 8, 2024
2 parents a903b91 + 939b611 commit 769267d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
===== 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
* Basic template now has license unlicense
Expand Down
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(lang dune 3.6)

(name eliom)
(version 10.4.0)
(version 10.4.1)
(maintainers [email protected])
(authors [email protected])
(license "LGPL-2.1-only WITH OCaml-LGPL-linking-exception")
Expand Down
2 changes: 1 addition & 1 deletion eliom.opam
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
12 changes: 10 additions & 2 deletions src/ppx/ppx_eliom_utils.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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] = '?'
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 769267d

Please sign in to comment.