The compiler for ReScript.
OTHER License
Bot releases are visible (Hide)
Published by cknitt 12 months ago
int
to float
. https://github.com/rescript-lang/rescript-compiler/pull/6448
@tag
on ordinary variants. https://github.com/rescript-lang/rescript-compiler/pull/6437
await
fails to compile (all locations would point to the internal function unsafe_await
). https://github.com/rescript-lang/rescript-compiler/pull/6452
rc.4
regressions:
rescript build -help
command. https://github.com/rescript-lang/rescript-compiler/pull/6439
rescript build -w
with a compilation error doesn't exit with an error code and continues waiting for changes. https://github.com/rescript-lang/rescript-compiler/pull/6460
Deno
to reserved names, so that modules named Deno
don't clash with the globally exposed Deno
object. https://github.com/rescript-lang/rescript-compiler/pull/6428
rescript
CLI to use stdout
/stderr
appropriately for help command's message. https://github.com/rescript-lang/rescript-compiler/pull/6439
f()
instead of f(undefined)
for f()
. https://github.com/rescript-lang/rescript-compiler/pull/6459
Published by cknitt about 1 year ago
@as
attribute. #6391
@obj
external ppx with @as
attribute. #6391
promise
, RegExes, Dates, File and Blob. https://github.com/rescript-lang/rescript-compiler/pull/6383
bool
. https://github.com/rescript-lang/rescript-compiler/pull/6368
rescript.json
configuration file and deprecate bsconfig.json
. https://github.com/rescript-lang/rescript-compiler/pull/6382
*.res
/*.resi
/*.ml
/.mli
file changes. Solves the issue of unnecessary recompiles on .css
, .ts
, and other unrelated file changes. https://github.com/rescript-lang/rescript-compiler/pull/6420
Js.Json.t
now uses Boolean(bool)
instead of explicit @as(true) True | @as(false) False
. https://github.com/rescript-lang/rescript-compiler/pull/6421
rescript build
command. https://github.com/rescript-lang/rescript-compiler/pull/6404
build
and clean
commands. https://github.com/rescript-lang/rescript-compiler/pull/6404
-verbose
flag to builds in watch mode. https://github.com/rescript-lang/rescript-compiler/pull/6404
Published by cknitt about 1 year ago
"uncurried": false
in bsconfig. https://github.com/rescript-lang/rescript-compiler/pull/6378
Bun
to reserved names, so that modules named Bun
don't clash with the globally exposed Bun
object. https://github.com/rescript-lang/rescript-compiler/pull/6381
Published by cknitt about 1 year ago
rescript build
will always build its dependency by default. The argument -with-deps
is not needed anymore. https://github.com/rescript-lang/rescript-compiler/pull/6350
Published by cknitt about 1 year ago
$$default
is no longer exported from the generated JavaScript when using default exports. https://github.com/rescript-lang/rescript-compiler/pull/6328
Published by cknitt over 1 year ago
Published by cknitt over 1 year ago
Published by cknitt over 1 year ago
%ffi
extension (experimental - not for production use!) that provides a more robust mechanism for JavaScript function interoperation by considering function arity in type constraints. This enhancement improves safety when dealing with JavaScript functions by enforcing type constraints based on the arity of the function. https://github.com/rescript-lang/rescript-compiler/pull/6251
%node
extension. https://github.com/rescript-lang/rescript-compiler/pull/6285
Published by cknitt over 1 year ago
"uncurried": false
is specified in the project config. https://github.com/rescript-lang/rescript-compiler/pull/6249
Published by cknitt over 1 year ago
-bs-super-errors
flag has been deprecated along with Super_errors. https://github.com/rescript-lang/rescript-compiler/pull/6243
@rescript/react
>= 0.12.0-alpha.2 is now required because of the React.fragment's children type fix. https://github.com/rescript-lang/rescript-compiler/pull/6238
'children
-> React.element
) https://github.com/rescript-lang/rescript-compiler/pull/6238
Js.Json.t
, Js.null
and Js.nullable
are now untagged variants representing their runtime values, instead of abstract types. https://github.com/rescript-lang/rescript-compiler/pull/6218
Published by cknitt over 1 year ago
moduleResolution
option to customize extensions on emitted import statements. This helps to adjust output compatibility with TypeScript projects using ESM. https://github.com/rescript-lang/rescript-compiler/pull/6182
node
(default): Drop extensions.node16
: Use TS output's extensions. Make it ESM-compatible.bundler
: Use TS input's extensions. Make it ESM-compatible.assert
as a regular function. assert
is no longer a unary expression. Example: before assert 1 == 2
is parsed as (assert 1) == 2
, now it is parsed as assert(1 == 2)
. https://github.com/rescript-lang/rescript-compiler/pull/6180
Published by cknitt over 1 year ago
foo(1, ...)
. This corresponds to curried application in the old mode. https://github.com/rescript-lang/rescript-compiler/pull/6166
@inline
attibute on uncurried functions. https://github.com/rescript-lang/rescript-compiler/pull/6152
@as
attributes: The subtype relationship now takes into account the compatibility of @as
attributes between corresponding fields, ensuring correctness in runtime representation.@@directive
. https://github.com/rescript-lang/rescript-compiler/pull/6174
Published by cknitt over 1 year ago
type t = {...t1, x:int, ...t2}
) https://github.com/rescript-lang/rescript-compiler/pull/5715
Published by cknitt over 1 year ago
:>
for records. https://github.com/rescript-lang/rescript-compiler/pull/5721
Published by cknitt over 1 year ago
.
. This can be turned on with @@uncurried
locally in a file. For project-level configuration in bsconfig.json
, there's a boolean config "uncurried"
, which propagates to dependencies, to turn on uncurried mode.@res.partial foo(x)
to express partial application. This is temporary and will later have some surface syntax.make
function of components is generated as an uncurried function.@genType
annotation at the module level, meaning that all the items in the module should be exported. https://github.com/rescript-lang/rescript-compiler/pull/6113
@genType
annotations on module definitions. https://github.com/rescript-lang/rescript-compiler/pull/6113
npm i -g rescript@9
rescript convert <reason files>
(. x) => y => 3
is not equivalent to (. x, y) => 3
anymore. It's instead equivalent to (. x) => { y => 3 }
.(. int) => string => bool
is not equivalen to (. int, string) => bool
anymore.**
is now right-associative. 2. ** 3. ** 2.
now compile to Math.pow(2, Math.pow(3, 2))
and not anymore Math.pow(Math.pow(2, 3), 2)
. Parentheses can be used to change precedence.j`$(a)$(b)`
interpolation deprecated in compiler version 10 https://github.com/rescript-lang/rescript-compiler/pull/6068
Printexc
@deriving(jsConverter)
not supported anymore for variant types https://github.com/rescript-lang/rescript-compiler/pull/6088
@genType.as
for records and variants which has become unnecessary. Use the language's @as
instead to channge the runtime representation without requiring any runtime conversion during FFI. https://github.com/rescript-lang/rescript-compiler/pull/6099 https://github.com/rescript-lang/rescript-compiler/pull/6101
async
and uncurried application https://github.com/rescript-lang/rescript-compiler/pull/5856
{v => ...}
is enclosed in braces https://github.com/rescript-lang/rescript-compiler/pull/5949
foo(x,_)
in uncurried mode would generate a curried function https://github.com/rescript-lang/rescript-compiler/pull/6082
@this
decorator in ReScript functions. This fix allows proper handling of async functions with the @this
decorator. Issue: https://github.com/rescript-lang/rescript-compiler/issues/6100
make
function and treat it like a curried one #5802 #5808 #5812
.res
syntax (Pexp_object
) https://github.com/rescript-lang/rescript-compiler/pull/5841
##
, which does not exist in .res
syntax https://github.com/rescript-lang/rescript-compiler/pull/5844
@meth
annotation as making the type uncurried for backwards compatibitly with some examples https://github.com/rescript-lang/rescript-compiler/pull/5845
@set
annotation for field update as generating an uncurried function https://github.com/rescript-lang/rescript-compiler/pull/5846
function$<fun_type, arity>
this avoids having to declare all the possible arities ahead of time https://github.com/rescript-lang/rescript-compiler/pull/5870
make
function and treat it like a curried one https://github.com/rescript-lang/rescript-compiler/pull/6081
|>
in uncurried mode by desugaring it https://github.com/rescript-lang/rescript-compiler/pull/6083
Published by cknitt over 1 year ago
lib
dir is included in the sources of bsconfig.json https://github.com/rescript-lang/rescript-compiler/pull/6055
await
https://github.com/rescript-lang/rescript-compiler/pull/6054
j`$(a)$(b)`
interpolation: use string templates `${a}${b}`
instead https://github.com/rescript-lang/rescript-compiler/pull/6067
Published by cknitt over 1 year ago
@@directive("use client;")
emits use client;
verbatim before imports https://github.com/rescript-lang/rescript-compiler/pull/5999
genType
: add Core
standard library support for the following builtin types: Null.t
, Nullable.t
, Undefined.t
, Dict.t<_>
, Promise.t<_>
, Date.t
, BigInt.t
, RegExp.t
, Map.t<_, _>
, WeakMap.t<_, _>
, Set<_>
, WeakSet<_>
https://github.com/rescript-lang/rescript-compiler/pull/6024
genType
: streamline the treatment of optionals as undefined https://github.com/rescript-lang/rescript-compiler/pull/6024
option<t>
as undefined | t
instead of null | undefined | t
. This is more permissive when importing functions taking optional values (allows to use option types), but stricter when e.g. exporting ReScript functions taking arguments of option type. Fallback: use Js.undefined<_>
instead.{x:option<string>}
as {x:(undefined | string)}
instead of {x?: string}
. This is more in line with TS's behaviour. Fallback: use {x?:string}
.async
https://github.com/rescript-lang/rescript-compiler/pull/5984
Js.Promise2
where then
and catch
were returning undefined
https://github.com/rescript-lang/rescript-compiler/pull/5996
@uncurry
external would be inlined and transformed in a way that loses async https://github.com/rescript-lang/rescript-compiler/pull/6011
async
functions where hovering on the body with a type error would show 'a => promise<'a>
everywhere https://github.com/rescript-lang/rescript-compiler/pull/6014
switch
expressions that contain braced cases
inside https://github.com/rescript-lang/syntax/pull/735
@gentype.import
as an alias to @genType.import
in the compiler https://github.com/rescript-lang/rescript-compiler/pull/6021
.gen.tsx
file https://github.com/rescript-lang/rescript-compiler/pull/5903
float
values would be different from the compare for type float
https://github.com/rescript-lang/rescript-compiler/pull/6043
~p as module(...)
https://github.com/rescript-lang/syntax/pull/739
Published by cknitt over 1 year ago
Published by cknitt almost 2 years ago
@as
instead{}
for inlined records where all fields are optional https://github.com/rescript-lang/rescript-compiler/pull/5900
_
in the make function with JSX V4. https://github.com/rescript-lang/syntax/pull/720
Published by cknitt almost 2 years ago