Skip to content

Commit

Permalink
Fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
kit-ty-kate committed Mar 29, 2024
1 parent 5836680 commit dcbed7f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion 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 @@ -352,6 +352,11 @@ module Cmo = struct
match ty with
| Otyp_var (_, s) -> Typ.var (var s)
| ((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)
Expand Down

0 comments on commit dcbed7f

Please sign in to comment.