You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Syntax: process uncurried function declarations explicitly in the parser/printer (rescript-lang#5794)
* process uncurried function declarations explicitly in the parser/printer
* Update CHANGELOG.md
* Remove example that is not idempotent
This is not idempotent:
let c2 = (. x) => y => x+y
* Interpred arity of uncurried explicitly.
Interpret the arity of uncurried functions explicitly so this is a unary function:
```
(. x) => y => x+y
```
The parser adds braces to the body to make this explicit.
This is a breaking change. And solves the lack of idempotency in rescript-lang#5794
* Update CHANGELOG.md
* Interpred arity of uncurried explicitly.
Interpret the arity of uncurried functions explicitly so this is a unary function:
```
(. x) => y => x+y
```
The parser adds braces to the body to make this explicit.
This is a breaking change. And solves the lack of idempotency in rescript-lang#5794
* Update CHANGELOG.md
* snap
* Added analogous tests for types.
* Update CHANGELOG.md
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5
Original file line number
Diff line number
Diff line change
@@ -20,10 +20,15 @@
20
20
- 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.
21
21
- Parse the attributes of labelled argument to the pattern attributes of argument instead of function.
22
22
- 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.
23
+
- Curried after uncurried is not fused anymore: `(. x) => y => 3` is not equivalent to `(. x, y) => 3` anymore. It's instead equivalent to `(. x) => { y => 3 }`.
24
+
Also, `(. int) => string => bool` is not equivalen to `(. int, string) => bool` anymore.
25
+
These are only breaking changes for unformatted code.
23
26
24
27
#### :nail_care: Polish
25
28
26
29
- Syntax: process uncurried types explicitly in the parser/printer https://github.com/rescript-lang/rescript-compiler/pull/5784
30
+
- Syntax: process uncurried function declarations explicitly in the parser/printer https://github.com/rescript-lang/rescript-compiler/pull/5794
0 commit comments