rescript-compiler icon indicating copy to clipboard operation
rescript-compiler copied to clipboard

The compiler for ReScript.

Results 500 rescript-compiler issues
Sort by recently updated
recently updated
newest added

Comparing ReScript's behavior to Prettier's, Prettier is consistent for types and values, but ReScript is not. My proposal is to **standardize on Prettier's behavior**, also because it seems to follow...

formatter

`Papaparse.res`: ```rescript @gentype.satisfies(("papaparse", "ParseError")) type parseError = { /** A generalization of the error */ @as("type") type_: [#Quotes | #Delimiter | #FieldMismatch], /** Standardized error code */ code: [#MissingQuotes |...

background: https://forum.rescript-lang.org/t/my-main-gripes-with-rescript-constructive-criticism/6981/5 right now, the formatter is ruthless in formatting. this is usually appreciated, but for externs, it becomes messy sometimes. imagine a file such as ```res @module("moduleX") external f1:...

syntax
formatter

1. type `exception Foo({name: string, msg: string})` and run formatter 2. notice still single line 3. add doc comment: ``` /** foo */ exception Foo({name: string, msg: string}) ``` and...

formatter

how to test: 1. type `type t = {name: string, msg: string}` and run formatter 2. notice still single line 3. type ``` type t = { name: string, msg:...

formatter

``` module Make: Pattern => { let fmt: event => string } ``` try this in a resi file. i would expect opening brace to be on same line as...

formatter

``` switch 0 { // Something something | 0 // Another something | 1 => let foo = 123 doSomethingInteresting(foo) } ``` formats to: ``` switch 0 { // Something...

formatter

``` switch "" { | "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" => {a: 1, b: 2, c: 3} } ``` formats to: ``` switch "" { | "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" => { a: 1, b: 2, c:...

formatter

Consider https://rescript-lang.org/try?version=v12.0.0-beta.13&module=esmodule&code=LYewJgrgNgpgBAdRgIwIIAUCScC8cDeAUHAJCiSxwAiA8gLIbZ5EkkAuAngA7wyzAwAdm2JwAvnEJjChWGzh8YA4QCUYAMwDCIAE46YAY3kAuOGoCGRgHT71AHgBy0KOeSwrbO0jRYrtBr6KymwAfCG4ZjCWbFYQAM4wauoAFE5QLm4wVoLOAJSyMPJBQmxJERbW8YkaXiiMfvT1xcIhqc6u7jnp+UA ```res module WebAPI = { module DOMAPI = { type element } } let elementRefCorrect : React.ref = React.useRef(Nullable.null) let elementRef = React.useRef(Nullable.null) ``` In F#, you can...

right now: ``` @unboxed type t = A(int) | B(int) ``` gives ``` This untagged variant definition is invalid: At most one case can be a number type (int or...