Skip to content

Commit 4ebbd22

Browse files
committed
Merge branch 'master' into test-docstrings-examples
2 parents 21f88c1 + df61392 commit 4ebbd22

File tree

139 files changed

+2866
-2776
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+2866
-2776
lines changed

.devcontainer/postCreate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Install dev dependencies from OPAM
44
opam init -y --bare --disable-sandboxing
5-
opam switch create 5.2.0 --packages ocaml-option-static
5+
opam switch create 5.2.1 --packages ocaml-option-static
66
opam install . --deps-only -y
77

88
# For IDE support, install the OCaml language server

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,23 +87,23 @@ jobs:
8787
matrix:
8888
include:
8989
- os: ubuntu-latest # x64
90-
ocaml_compiler: ocaml-variants.5.2.0+options,ocaml-option-static
90+
ocaml_compiler: ocaml-variants.5.2.1+options,ocaml-option-static
9191
upload_binaries: true
9292
upload_libs: true
9393
# Build the playground compiler and run the benchmarks on the fastest runner
9494
build_playground: true
9595
benchmarks: true
9696
- os: buildjet-2vcpu-ubuntu-2204-arm # ARM
97-
ocaml_compiler: ocaml-variants.5.2.0+options,ocaml-option-static
97+
ocaml_compiler: ocaml-variants.5.2.1+options,ocaml-option-static
9898
upload_binaries: true
9999
- os: macos-13 # x64
100-
ocaml_compiler: 5.2.0
100+
ocaml_compiler: 5.2.1
101101
upload_binaries: true
102102
- os: macos-14 # ARM
103-
ocaml_compiler: 5.2.0
103+
ocaml_compiler: 5.2.1
104104
upload_binaries: true
105105
- os: windows-latest
106-
ocaml_compiler: 5.2.0
106+
ocaml_compiler: 5.2.1
107107
upload_binaries: true
108108

109109
# Verify that the compiler still builds with older OCaml versions
@@ -151,7 +151,7 @@ jobs:
151151
# matrix.ocaml_compiler may contain commas
152152
- name: Get OPAM cache key
153153
shell: bash
154-
run: echo "opam_cache_key=opam-env-v5-${{ matrix.os }}-${{ matrix.ocaml_compiler }}-${{ hashFiles('dune-project') }}" | sed 's/,/-/g' >> $GITHUB_ENV
154+
run: echo "opam_cache_key=opam-env-v6-${{ matrix.os }}-${{ matrix.ocaml_compiler }}-${{ hashFiles('dune-project') }}" | sed 's/,/-/g' >> $GITHUB_ENV
155155

156156
- name: Restore OPAM environment
157157
id: cache-opam-env
@@ -167,7 +167,7 @@ jobs:
167167
key: ${{ env.opam_cache_key }}
168168

169169
- name: Use OCaml ${{matrix.ocaml_compiler}}
170-
uses: ocaml/setup-ocaml@v3.0.15
170+
uses: ocaml/setup-ocaml@v3.1.4
171171
if: steps.cache-opam-env.outputs.cache-hit != 'true'
172172
with:
173173
ocaml-compiler: ${{matrix.ocaml_compiler}}

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
1313
# 12.0.0-alpha.6 (Unreleased)
1414
- Fix exponential notation syntax. https://github.com/rescript-lang/rescript/pull/7174
15+
- Add `Option.all` & `Result.all` helpers. https://github.com/rescript-lang/rescript/pull/7181
1516

1617
#### :bug: Bug fix
1718
- Fix bug where a ref assignment is moved ouside a conditional. https://github.com/rescript-lang/rescript/pull/7176
@@ -23,7 +24,10 @@
2324
- Ast cleanup: remove exp object and exp unreachable. https://github.com/rescript-lang/rescript/pull/7189
2425
- Ast cleanup: explicit representation for optional record fields in types. https://github.com/rescript-lang/rescript/pull/7190 https://github.com/rescript-lang/rescript/pull/7191
2526
- AST cleanup: first-class expression and patterns for records with optional fields. https://github.com/rescript-lang/rescript/pull/7192
26-
27+
- AST cleanup: Represent the arity of uncurried function definitions directly in the AST. https://github.com/rescript-lang/rescript/pull/7197
28+
- AST cleanup: Remove Pexp_function from the AST. https://github.com/rescript-lang/rescript/pull/7198
29+
- Remove unused code from Location and Rescript_cpp modules. https://github.com/rescript-lang/rescript/pull/7150
30+
- Build with OCaml 5.2.1. https://github.com/rescript-lang/rescript-compiler/pull/7201
2731

2832
# 12.0.0-alpha.5
2933

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Make sure you have [opam](https://opam.ocaml.org/doc/Install.html) installed on
4747
opam init
4848

4949
# Any recent OCaml version works as a development compiler
50-
opam switch create 5.2.0 # can also create local switch with opam switch create
50+
opam switch create 5.2.1 # can also create local switch with opam switch create
5151

5252
# Install dev dependencies from OPAM
5353
opam install . --deps-only --with-test --with-dev-setup -y

analysis/reanalyze/src/Arnold.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ module Compile = struct
908908
let open Command in
909909
c +++ ConstrOption Rnone
910910
| _ -> c)
911-
| Texp_function {cases} -> cases |> List.map (case ~ctx) |> Command.nondet
911+
| Texp_function {case = case_} -> case ~ctx case_
912912
| Texp_match (e, casesOk, casesExn, _partial)
913913
when not
914914
(casesExn

analysis/reanalyze/src/DeadValue.ml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -156,18 +156,16 @@ let rec collectExpr super self (e : Typedtree.expression) =
156156
exp_desc =
157157
Texp_function
158158
{
159-
cases =
160-
[
161-
{
162-
c_lhs = {pat_desc = Tpat_var (etaArg, _)};
163-
c_rhs =
164-
{
165-
exp_desc =
166-
Texp_apply
167-
({exp_desc = Texp_ident (idArg2, _, _)}, args);
168-
};
169-
};
170-
];
159+
case =
160+
{
161+
c_lhs = {pat_desc = Tpat_var (etaArg, _)};
162+
c_rhs =
163+
{
164+
exp_desc =
165+
Texp_apply
166+
({exp_desc = Texp_ident (idArg2, _, _)}, args);
167+
};
168+
};
171169
};
172170
} )
173171
when Ident.name idArg = "arg"

analysis/src/CompletionFrontEnd.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1318,7 +1318,7 @@ let completionWithParser1 ~currentFile ~debug ~offset ~path ~posCursor
13181318
match exprToContextPath lhs with
13191319
| Some contextPath -> setResult (Cpath (CPObj (contextPath, label)))
13201320
| None -> ())
1321-
| Pexp_fun (lbl, defaultExpOpt, pat, e) ->
1321+
| Pexp_fun (lbl, defaultExpOpt, pat, e, _) ->
13221322
let oldScope = !scope in
13231323
(match (!processingFun, !currentCtxPath) with
13241324
| None, Some ctxPath -> processingFun := Some (ctxPath, 0)

analysis/src/DocumentSymbol.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ let command ~path =
4141
let rec exprKind (exp : Parsetree.expression) =
4242
match exp.pexp_desc with
4343
| Pexp_fun _ -> Function
44-
| Pexp_function _ -> Function
4544
| Pexp_constraint (e, _) -> exprKind e
4645
| Pexp_constant (Pconst_string _) -> String
4746
| Pexp_constant (Pconst_float _ | Pconst_integer _) -> Number

analysis/src/DumpAst.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ and printExprItem expr ~pos ~indentation =
213213
| None -> ""
214214
| Some expr -> "," ^ printExprItem expr ~pos ~indentation)
215215
^ ")"
216-
| Pexp_fun (arg, _maybeDefaultArgExpr, pattern, nextExpr) ->
216+
| Pexp_fun (arg, _maybeDefaultArgExpr, pattern, nextExpr, _) ->
217217
"Pexp_fun(\n"
218218
^ addIndentation (indentation + 1)
219219
^ "arg: "

analysis/src/Utils.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ let identifyPexp pexp =
8585
| Parsetree.Pexp_ident _ -> "Pexp_ident"
8686
| Pexp_constant _ -> "Pexp_constant"
8787
| Pexp_let _ -> "Pexp_let"
88-
| Pexp_function _ -> "Pexp_function"
8988
| Pexp_fun _ -> "Pexp_fun"
9089
| Pexp_apply _ -> "Pexp_apply"
9190
| Pexp_match _ -> "Pexp_match"

0 commit comments

Comments
 (0)