Skip to content

Commit 60909ff

Browse files
authored
require OCaml 4.08 (#2840)
* require OCaml 4.08 * ppxlib: upper bound
1 parent 285a32c commit 60909ff

12 files changed

+801
-1008
lines changed

.github/workflows/opam-ci.yml

-2
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
setup:
20-
- {ocaml-compiler: '4.06.x', os: ubuntu-latest}
2120
- {ocaml-compiler: '4.10.x', os: ubuntu-latest}
2221
- {ocaml-compiler: '4.12.x', os: ubuntu-latest}
2322
- {ocaml-compiler: '4.13.x', os: ubuntu-latest}
2423
- {ocaml-compiler: '4.14.x', os: ubuntu-latest}
2524
- {ocaml-compiler: 'ocaml-base-compiler.5.3.0~beta2', os: ubuntu-latest}
26-
- {ocaml-compiler: '4.06.x', os: macos-13}
2725
- {ocaml-compiler: 'ocaml-base-compiler.5.3.0~beta2', os: macos-13}
2826
- {ocaml-compiler: 'ocaml-base-compiler.5.3.0~beta2', os: macos-14}
2927
# looks like setup-ocaml@v3 can only run actions on windows for

dune-project

+5-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
(depends
3434
(ocaml
3535
(and
36-
(>= "4.06")
36+
(>= "4.08")
3737
(< "5.4")))
3838
(ocamlfind :build)
3939
(dune-build-info
@@ -46,7 +46,9 @@
4646
ppx_derivers
4747
cppo
4848
(ppxlib
49-
(>= "0.28.0"))))
49+
(and
50+
(>= "0.28.0")
51+
(< "0.36.0")))))
5052

5153
(package
5254
(name rtop)
@@ -56,7 +58,7 @@
5658
(depends
5759
(ocaml
5860
(and
59-
(>= "4.06")
61+
(>= "4.08")
6062
(< "5.4")))
6163
(reason
6264
(= :version))

flake.lock

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

reason.opam

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ homepage: "https://reasonml.github.io/"
1616
bug-reports: "https://github.com/reasonml/reason/issues"
1717
depends: [
1818
"dune" {>= "3.8"}
19-
"ocaml" {>= "4.06" & < "5.4"}
19+
"ocaml" {>= "4.08" & < "5.4"}
2020
"ocamlfind" {build}
2121
"dune-build-info" {>= "2.9.3"}
2222
"menhir" {>= "20180523"}
2323
"merlin-extend" {>= "0.6.2"}
2424
"fix"
2525
"ppx_derivers"
2626
"cppo"
27-
"ppxlib" {>= "0.28.0"}
27+
"ppxlib" {>= "0.28.0" & < "0.36.0"}
2828
"odoc" {with-doc}
2929
]
3030
build: [

rtop.opam

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ homepage: "https://reasonml.github.io/"
1414
bug-reports: "https://github.com/reasonml/reason/issues"
1515
depends: [
1616
"dune" {>= "3.8"}
17-
"ocaml" {>= "4.06" & < "5.4"}
17+
"ocaml" {>= "4.08" & < "5.4"}
1818
"reason" {= version}
1919
"utop" {>= "2.0"}
2020
"cppo"

src/reason-merlin/ocamlmerlin_reason.cppo.ml

+1-4
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ module Reason_reader = struct
3838
Reason_toolchain_conf.insert_completion_ident := Some pos;
3939
Misc.try_finally
4040
(fun () -> ({complete_labels = true}, parse t))
41-
#if OCAML_VERSION >= (4, 8, 0)
42-
~always:
43-
#endif
44-
(fun () -> Reason_toolchain_conf.insert_completion_ident := pos')
41+
~always:(fun () -> Reason_toolchain_conf.insert_completion_ident := pos')
4542

4643
let parse_line _ _ line =
4744
let buf = Lexing.from_string line in

src/reason-parser/dune

-12
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,6 @@
4343
%{targets}
4444
(run ../menhir-recover/main.exe reason_parser.cmly))))
4545

46-
(rule
47-
(targets reason_syntax_util.ml)
48-
(deps reason_syntax_util.cppo.ml)
49-
(action
50-
(run %{bin:cppo} -V OCAML:%{ocaml_version} %{deps} -o %{targets})))
51-
52-
(rule
53-
(targets reason_syntax_util.mli)
54-
(deps reason_syntax_util.cppo.mli)
55-
(action
56-
(run %{bin:cppo} -V OCAML:%{ocaml_version} %{deps} -o %{targets})))
57-
5846
(library
5947
(name reason)
6048
; Uncomment to allow make coverage target to work

src/reason-parser/reason_parser.mly

+3-3
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ let mk_record_expr ?loc (exten, fields) =
443443
| _ -> mkexp ?loc (Pexp_record (fields, exten))
444444

445445
let array_function ?(loc=dummy_loc()) str name =
446-
ghloc ~loc (Longident.Ldot(Lident str, (if !Clflags.fast then "unsafe_" ^ name else name)))
446+
ghloc ~loc (Longident.Ldot(Lident str, (if !Clflags.unsafe then "unsafe_" ^ name else name)))
447447

448448
let syntax_error loc s =
449449
raise_error (Other_syntax_error s) loc
@@ -665,7 +665,7 @@ let bigarray_function ?(loc=dummy_loc()) str name =
665665
ghloc ~loc (Longident.Ldot(Ldot(Lident "Bigarray", str), name))
666666

667667
let bigarray_get ?(loc=dummy_loc()) arr arg =
668-
let get = if !Clflags.fast then "unsafe_get" else "get" in
668+
let get = if !Clflags.unsafe then "unsafe_get" else "get" in
669669
match arg with
670670
[c1] ->
671671
mkexp(Pexp_apply(mkexp ~ghost:true ~loc (Pexp_ident(bigarray_function ~loc "Array1" get)),
@@ -681,7 +681,7 @@ let bigarray_get ?(loc=dummy_loc()) arr arg =
681681
[Nolabel, arr; Nolabel, mkexp ~ghost:true ~loc (Pexp_array coords)]))
682682

683683
let bigarray_set ?(loc=dummy_loc()) arr arg newval =
684-
let set = if !Clflags.fast then "unsafe_set" else "set" in
684+
let set = if !Clflags.unsafe then "unsafe_set" else "set" in
685685
match arg with
686686
[c1] ->
687687
mkexp(Pexp_apply(mkexp ~ghost:true ~loc (Pexp_ident(bigarray_function ~loc "Array1" set)),

0 commit comments

Comments
 (0)