rescript-compiler
rescript-compiler copied to clipboard
The compiler for ReScript.
`Js.Json.stringifyAny` has a chance to throw an exception, `TypeError`. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#exceptions ```rescript Js.Json.stringifyAny: 'a => option ``` I think it is better to rename it to `stringifyAnyExn` or to wrap it...
Resolves #6241 This PR removes `lazy` keyword and modifies itself to use `Lazy.from_fun` and `Lazy.from_val` instead. ## limitations The semantics were not fully compatible. ### 1. let rec syntax In...
Remove the remaining `@bs.xxx` attributes and clean up. Also (mostly) fixes #6636. The only remaining one is the deprecated `@bs.send.pipe` which is still in use in the `Js` module. Not...
This doesn't work: [link](https://rescript-lang.org/try?version=v11.0.1&code=C4TwDgpgBMD2sBtgEswGMAWBDATsKAvFAN4AeAXFAM7A7IB2A5gL4BQrCE+AblggK4QAYrBwBbLMGAQchasEkAVcNAIA+EqyhQAAsAzIqUABSxKcRCnTY8ASkIbiW7QEgAwrHpVEEAHQJYRlNfUnttZzYoZiA) Storing the fn in a variable and then returning it works. [Link](https://rescript-lang.org/try?version=v11.0.1&code=C4TwDgpgBMD2sBtgEswGMAWBDATsKAvFAN4AeAXFAM7A7IB2A5gL4BQrCE+AblggK4QAYrBwBbLMGAQchasEkAVcNAIA+EqyhRO+UnIACwDMipQAFLEpxEKdNjwBKQhuJbtASADCselUQQAHQIsIyWgaTO2u5s2qRazEA)
Repro: ```rescript let f = (~a=0, b, c) => a + b + c let x = f(42) ``` yields: ``` This uncurried function has type (~a: int=?, int, int)...
Repro, in v11 with uncurrying enabled: ```rescript module A = { @react.component let make = (type a, ~foo=?) => React.null } ``` yields the error: ``` [E] Line 6, column...
I came across this while cleaning up the `bs.` prefix handling. ``` @bs.string let x = 42 ``` gives ``` [E] Line 1, column 0: Unused attribute: bs.string This means...
Hi @zth! I've got a somewhat working implementation of the dict literal syntax. #6545 So far this branch is a bit of a playground I was using to get familiar...
Throws an instance of JavaScript's `new Error()` and adds the extension payload for `cause` option ### Breaking Changes - `cause` has a good support on browsers. See [caniuse.com](https://caniuse.com/mdn-javascript_builtins_error_cause) - Supported...
Hey! I've identified an issue with genType with React component ## Explaination I have two components which are globally the same ```res // Working.res type t = string type props...