Quantcast
Channel: ReScript Forum - Latest posts
Browsing all 1813 articles
Browse latest View live

Welcome to the ReScript Forum

Hello everyone! I am new to rescript, what resources or books should i use to learn the language?

View Article


Record in list decomposed in a single step needs type hint, is this a bug?

I made a hack to convert let { record-pattern} = expr ==> switch expr { {record-pattern} => } So that more type info could be used to resolve the names, the fix could be relax the rule to...

View Article


Record in list decomposed in a single step needs type hint, is this a bug?

Out of curiosity, how does this explain the difference of the record type resolution in and out of the closure? // breaks let {a, b} = Definition.getRecord() let doIt = () => { // compiles let {a,...

View Article

Welcome to the ReScript Forum

Welcome to ReScript! The most up to date resource are the ReScript docs: https://rescript-lang.org/ There is a somewhat recent book: Introducing ReScript: Functional Programming for Web Applications |...

View Article

Record in list decomposed in a single step needs type hint, is this a bug?

Toplevel is not an expression. Another easier fix is to change the order of typing rules, that’s what I did in MoonBit.

View Article


What keep you guys using Rescript?

For me it’s all about the quality of the type system (and ML languages do very well here): Type soundness (there seems little point to a type system without it). Hindley-Milner type inference ADT’s, /...

View Article

[RFC] Generic JSX transform

Hey, I have a custom function which should create a jsx element type options<'props> = { name: string, render: 'props => Jsx.element, } let makeWithProps = options => { ... } module...

View Article

Welcome to the ReScript Forum

thanks alot. The tutorial on youtube is great.

View Article


[RFC] Generic JSX transform

I think you should use an empty record for such cases.

View Article


A better way to call an async function inside an event handler

in ReScript is there a better way to call an async function inside an event handler than using ->ignore? Need to call this async function inside an onClick but get compiler error unless I call it...

View Article

A better way to call an async function inside an event handler

a safer way to ignore a promise if you use RescriptCore is to call Promise.done.

View Article

A better way to call an async function inside an event handler

I have this utility function in my project: // Turn async function into a fire-and-forget function let prime: ('a => promise<unit>) => 'a => unit = f => x => f(x)->ignore With...

View Article

A better way to call an async function inside an event handler

In uncurried mode, doing this should be safe as well: let _ = handleDuplicateQuote()

View Article


A better way to call an async function inside an event handler

i’ve used this but ->ignore feels less hacky to me

View Article

State of rescript lib Docs

Hello everyone, I’m keen to know, how the rescript library authors of you approach documentation for such a lib? Do you just write a (simple?) readme? Do you have api docs? (How? Where?) Do you use...

View Article


@deprecated only works on external?

Do I have that right? Would really love to have this everywhere. Making heroic changes is fun but its better in teams to give those breaking changes a little time to migrate.

View Article

@deprecated only works on external?

It should work on more than externals. Do you have a reproduction?

View Article


@deprecated only works on external?

Let me see, I just saw it in vscode with local work…

View Article

Image may be NSFW.
Clik here to view.

@deprecated only works on external?

@deprecated on %raw implementations: ReScript Documentation ReScript Playground Try ReScript in the browser

View Article

Image may be NSFW.
Clik here to view.

@deprecated only works on external?

@deprecated on decorator of external function: ReScript Documentation ReScript Playground Try ReScript in the browser

View Article
Browsing all 1813 articles
Browse latest View live