Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to OCaml 5.2 #789

Merged
merged 2 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading