rescript-compiler
rescript-compiler copied to clipboard
The compiler for ReScript.
The following ReScript code ```rescript type status1 = OPEN | CLOSED let isOpen1 = (status: status1) => switch status { | OPEN => true | CLOSED => false } type...
```res let i0 = (22130921800000. -. 0.)->Belt.Float.toInt let i1 = (22130921800000.)->Belt.Float.toInt ``` generates ```js var i0 = 22130921800000 - 0 | 0; // -1044676288 var i1 = 2147483647; // max...
In the compiler v10, since the variant outputs were an integer and were not able to customized, we added the original name as a comment as a hint. e.g. ```res...
I would love to be able to build apis in rescript for users in typescript and one thing that would help is supporting scoped polymorphic types. For example: ```res @genType...
This caused a bug that one of our tests caught. Is this a known breaking change or a bug? (compare 10.1 vs 11 in the playground) https://rescript-lang.org/try?version=v10.1.2&code=FAguE8AcFMAIDMCWAbaAFATgexhiAhAQwHMQABLAIwCtZoAPUaDAO0OVgFtCBraAMRTpsuAiQBcsABTBYsAH4B9CDEkBnUBkQtiAXgD8AGhBz5yQhoCyWACaIk0G5PjIshUAeOzYAVxaJQLwBKWF0APgQhTBxmMWJQ2AAiRJAAKTUAOldiKW4+QVRo0XAiHKUVaF1EynNEw2kgxqA
Thank you for filing! Check list: - [x] Is it a bug? Usage questions should often be asked in the [forum](https://forum.rescript-lang.org) instead. - [x] Concise, focused, friendly issue title &...
Solves part of https://github.com/rescript-lang/rescript-compiler/discussions/6273 Closes https://github.com/rescript-lang/rescript-compiler/issues/6562 Closes https://github.com/rescript-lang/rescript-compiler/issues/6277 This PoC adds support for type spreads of regular variants in patterns. This is already a thing with polyvariants, and now it's...
Introduce an annotation to rewrite mutually recursive functions to use a trampoline. This will enable the user to avoid exceeding the stack size at the expense of more overhead until...
Hi, I am facing an issue which is faced also by many of my colleagues, the build for rescript files is taking way longes than expected. I am using rescript...
The error says: ``` This function should have type ( ~estimatedRetailPrice: Money.t=?, ~mileage: Vehicle.Mileage.t, ) => (~onSuccess: unit => unit, ~onFailure: string => unit) => unit but its first argument...