[ANN] ReScript Retreat Roadmap Summary 2024
In v12+ there won’t be a way to write code in ml that compiles in uncurried mode, since most of uncurried mode is at handled by wrapping things in the AST with constructs that can’t be expressed in...
View Article[ANN] ReScript Retreat Roadmap Summary 2024
The code that I need to “duplicate” is indeed a pain in the ass, since are both 2k files from Css and CssJs definitions: styled-ppx/packages/css/js/Css_Js_Core.ml at main · davesnx/styled-ppx · GitHub...
View ArticleTrack Side Effects
Just in general- not in React or anything- is there a way to keep track effectful functions, like in Haskell?
View ArticleTrack Side Effects
No, rescript type system comes from ocaml, which is in general more pragmatic than haskell when it comes to use inpure code, so there’s no tracking of this.
View Article[ANN] ReScript Retreat Roadmap Summary 2024
Uncurried mode actually isn’t the same as the old uncurry semantics, it’s another thing entirely. As an example, internally in uncurried mode each function is wrapped in a variant constructor...
View Article[ANN] ReScript Retreat Roadmap Summary 2024
Got it, will see what are the paths forward. Thanks @zth
View Article[ANN] ReScript Retreat Roadmap Summary 2024
Maybe there’s an older rescript version that can reprint ml as res. You can reprint Reason syntax in older versions but I’m unsure about ml, maybe that works too. If so I think just reprinting your...
View ArticleNameof operator
Does ReScript have the concept of a nameof operator? Example in F#: Nameof - F# | Microsoft Learn Something that can print the current value or field name of a symbol. I’m my code I need to do...
View ArticleNameof operator
There’s no such operator in rescript. You can build a runtime helper for this using proxy: await orderSnapshot->update_field(o => o.isProcessed, true) Where o is a proxy used to track which...
View Article[ANN] ReScript editor tooling version 1.52.0 is out
We’re happy to announce the release of 1.52.0 of the ReScript editor tooling. This release brings many bug fixes and stability improvements, as well as some new features. You can see the entire...
View ArticleNameof operator
I’m talking about javascript proxy with get trap MDN Web Docs Proxy - JavaScript | MDN The Proxy object enables you to create a proxy for another object, which can intercept and redefine fundamental...
View ArticleRescript Vite project with insource: false
If you really want "insource": false, take a look here: https://github.com/jihchi/vite-plugin-rescript?tab=readme-ov-file#using-loader. The loader functionality of this vite plugin was made to tackle...
View ArticleProposal: Kawaii logo
ReScript, is a noun by itself, so the prefix ‘Re’ shouldn’t be translated as 再 (which is also Re- of course, but It’s like retry, or reproduce) I guess. I thought the ‘Re’ comes from ReasonML, not the...
View Article[ANN] ReScript editor tooling version 1.52.0 is out
How exactly does * Add support for the rewatch build system for incremental compilation. #965 work? When I run rewatch watch in a terminal, will the tooling just pick up on that?
View ArticleStatic component properties in React
Hello, I want to use CLI - React Email and I’m wondering how I would write a binding for export default function Email(props) { return ( <div> <a src={props.source}>click here if you want...
View ArticleNameof operator
So something along these lines: const handler = { get: function (target, property, receiver) { return property; }, }; let nameof = (instance, getProperty) => { const p = new Proxy(instance,...
View ArticleStatic component properties in React
I guess the closest you can do is writing a binding with a @get attribute to the make function. I’ll write it down as soon as I’m back on my computer.
View ArticleStatic component properties in React
Here’s an approach using %raw: module Email = { @react.component let make = (~source) => { <div> <a src={source}> {React.string("click here if you want candy 👀")} </a>...
View Article