bs-platform
Advanced tools
Changelog
8.4.2
Changelog
8.4.1
Syntax submodule upgrades from 7f5c968 to 7cc70c9
#4856 #4858 Improve code generation for pattern match: Input:
type t =
| A
| B
| C
| D (int )
| E (int)
let f = x => {
switch x {
| A => 0
| B => 1
| C => 2
| D (x) => x
| E (x) => x + 1
}
}
Output was:
function f(x) {
if (typeof x !== "number") {
if (x.TAG) {
return x._0 + 1 | 0;
} else {
return x._0;
}
switch (x) {
case /* A */0 :
return 0;
case /* B */1 :
return 1;
case /* C */2 :
return 2;
}
}
Now:
function f(x) {
if (typeof x !== "number") {
if (x.TAG === /* D */ 0) {
return x._0;
} else {
return (x._0 + 1) | 0;
}
}
switch (x) {
case /* A */ 0:
return 0;
case /* B */ 1:
return 1;
case /* C */ 2:
return 2;
}
}
#4855 internal changes changes to compiler-libs will trigger a rebuild of the compiler, this allows us to see how changes of compiler-libs affect bsc.exe quickly
#4850 replace ocp-ocamlres with a lightweight nodejs script, get rid of such dev dependency
#4854 #4848 #4847 #4844 #4836 #4826 #4824
Pinned packages support and -make-world
respect changes of dependencies
#4840 #4841 more robust handling of removing stale output
#4831 use relative paths in the command line It will be expanded to absolute path right after the compiler see the path, such changes work better with the underlying ninja build engine, and should perform slightly better
#4828 no need pass -o for compiling, inferred directly (with namespace support too)
#4827 internal the dev version of bsc now behave roughly the same as the released version
#4825 fix a typo in the warning %@string
-> @string
#4823 introduce a new warning 109: toplevel expression is expected to have type unit It is turned on as warn-error by default. This warning is introduced to avoid partial application errors in a curried language
#4822 more robust hanlding of : ignore warnings and warn-error when bsb is building dependencies