Skip to content

Syntax: process uncurried types explicitly in the parser/printer. #5784

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

Merged
merged 9 commits into from
Nov 9, 2022
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
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
- `rescript convert <reason files>`
- Remove obsolete built-in project templates and the "rescript init" functionality. This will be replaced by the create-rescript-app project that is maintained separately.
- Parse the attributes of labelled argument to the pattern attributes of argument instead of function.
- Made pinned dependencies transitive: if *a* is a pinned dependency of *b* and *b* is a pinned dependency of *c*, then *a* is implicitly a pinned dependency of *c*. This change is only breaking if your build process assumes non-transitivity.

#### :boom: Breaking Change
#### :nail_care: Polish

- Made pinned dependencies transitive: if *a* is a pinned dependency of *b* and *b* is a pinned dependency of *c*, then *a* is implicitly a pinned dependency of *c*.
- This change is only breaking if your build process assumes non-transitivity. Few if any builds do. In the typical case where you build your monorepo by running `rescript build` on each package in your repo, you don't need to make any changes. There is no way of building with the old, non-transitive behavior.
- Syntax: process uncurried types explicitly in the parser/printer https://github.com/rescript-lang/rescript-compiler/pull/5784

# 10.1.0-rc.3

Expand Down
6 changes: 3 additions & 3 deletions jscomp/test/build.ninja
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ o test/jsoo_485_test.cmi test/jsoo_485_test.cmj : cc test/jsoo_485_test.ml | $bs
o test/key_word_property.cmi test/key_word_property.cmj : cc test/key_word_property.ml | $bsc $stdlib runtime
o test/key_word_property2.cmi test/key_word_property2.cmj : cc test/key_word_property2.ml | test/export_keyword.cmj $bsc $stdlib runtime
o test/key_word_property_plus_test.cmi test/key_word_property_plus_test.cmj : cc test/key_word_property_plus_test.ml | test/global_mangles.cmj test/mt.cmj $bsc $stdlib runtime
o test/label_uncurry.cmi test/label_uncurry.cmj : cc test/label_uncurry.ml | $bsc $stdlib runtime
o test/label_uncurry.cmi test/label_uncurry.cmj : cc test/label_uncurry.res | $bsc $stdlib runtime
o test/large_integer_pat.cmi test/large_integer_pat.cmj : cc test/large_integer_pat.ml | $bsc $stdlib runtime
o test/large_record_duplication_test.cmi test/large_record_duplication_test.cmj : cc test/large_record_duplication_test.ml | test/mt.cmj $bsc $stdlib runtime
o test/largest_int_flow.cmi test/largest_int_flow.cmj : cc test/largest_int_flow.ml | $bsc $stdlib runtime
Expand Down Expand Up @@ -491,8 +491,8 @@ o test/pipe_send_readline.cmi test/pipe_send_readline.cmj : cc test/pipe_send_re
o test/pipe_syntax.cmi test/pipe_syntax.cmj : cc test/pipe_syntax.ml | $bsc $stdlib runtime
o test/poly_empty_array.cmi test/poly_empty_array.cmj : cc test/poly_empty_array.ml | $bsc $stdlib runtime
o test/poly_type.cmi test/poly_type.cmj : cc test/poly_type.ml | $bsc $stdlib runtime
o test/poly_variant_test.cmj : cc_cmi test/poly_variant_test.ml | test/mt.cmj test/poly_variant_test.cmi $bsc $stdlib runtime
o test/poly_variant_test.cmi : cc test/poly_variant_test.mli | $bsc $stdlib runtime
o test/poly_variant_test.cmj : cc_cmi test/poly_variant_test.res | test/mt.cmj test/poly_variant_test.cmi $bsc $stdlib runtime
o test/poly_variant_test.cmi : cc test/poly_variant_test.resi | $bsc $stdlib runtime
o test/polymorphic_raw_test.cmi test/polymorphic_raw_test.cmj : cc test/polymorphic_raw_test.ml | test/mt.cmj $bsc $stdlib runtime
o test/polymorphism_test.cmj : cc_cmi test/polymorphism_test.ml | test/polymorphism_test.cmi $bsc $stdlib runtime
o test/polymorphism_test.cmi : cc test/polymorphism_test.mli | $bsc $stdlib runtime
Expand Down
2 changes: 1 addition & 1 deletion jscomp/test/label_uncurry.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function u1(f) {
console.log(f(2, "x"));
}

function h(unit) {
function h(x) {
return 3;
}

Expand Down
26 changes: 0 additions & 26 deletions jscomp/test/label_uncurry.ml

This file was deleted.

17 changes: 17 additions & 0 deletions jscomp/test/label_uncurry.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
type t = (. ~x: int, ~y: string) => int

type u = Js.Fn.arity2<(~x: int, ~y: string) => int>

let f = (x: t): u => x

let u: u = (. ~x, ~y) => x + int_of_string(y)

let u1 = (f: u) => {
f(. ~y="x", ~x=2)->Js.log
f(. ~x=2, ~y="x")->Js.log
}
let h = (. ~x : unit) => 3

let a = u1(u)

type u0 = (. ~x: int=?, ~y: string) => int
10 changes: 5 additions & 5 deletions jscomp/test/poly_variant_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,21 @@ var vv = [
hey_int(4)
];

eq("File \"poly_variant_test.ml\", line 58, characters 5-12", vv, [
eq("File \"poly_variant_test.res\", line 64, characters 5-12", vv, [
3,
0,
4
]);

eq("File \"poly_variant_test.ml\", line 59, characters 5-12", [
eq("File \"poly_variant_test.res\", line 65, characters 5-12", [
hey_int(5),
hey_int(6)
], [
5,
6
]);

eq("File \"poly_variant_test.ml\", line 60, characters 5-12", uu, [
eq("File \"poly_variant_test.res\", line 66, characters 5-12", uu, [
"on_open",
"on_closed",
"in"
Expand All @@ -91,9 +91,9 @@ function p_is_int_test(x) {
}
}

eq("File \"poly_variant_test.ml\", line 142, characters 5-12", 2, 2);
eq("File \"poly_variant_test.res\", line 156, characters 5-12", 2, 2);

eq("File \"poly_variant_test.ml\", line 143, characters 5-12", 3, p_is_int_test({
eq("File \"poly_variant_test.res\", line 157, characters 5-12", 3, p_is_int_test({
NAME: "b",
VAL: 2
}));
Expand Down
164 changes: 0 additions & 164 deletions jscomp/test/poly_variant_test.ml

This file was deleted.

47 changes: 0 additions & 47 deletions jscomp/test/poly_variant_test.mli

This file was deleted.

Loading