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

Module-scoped type as alias?

Hello, Consider the following module type definition: module type Comparable = { type t let equal: (t, t) => bool } Now, the CmpInt module instance of the module type Comparable: module CmpInt:...

View Article


Module-scoped type as alias?

What you’re actually looking for is this: module CmpInt: Comparable with type t = int = { type t = int let equal = (x: int, y: int) => x === y } Otherwise the type t is abstract and the compiler...

View Article


Module-scoped type as alias?

Perfect, thanks a lot.

View Article

I'm working on some bindings for a Remix app and I could use some help with a...

This is what I have so far: GitHub - jderochervlk/rescript-remix: ReScript bindings for Remix

View Article

I'm working on some bindings for a Remix app and I could use some help with a...

Nice thanks, I’ll take a look.

View Article


Give your feedback about rescript-webapi!

I just want to express my excitement for this PR: Add IntersectionObserverAPI by stephanoskomnenos · Pull Request #43 · rescript-lang/experimental-rescript-webapi · GitHub This aligns perfectly with...

View Article

EdgeDB errors when using Rescript v12 on Deno with experimental web apis

I’m working on a project, a site that lets my friends vote on movies to watch on my plex server, and I am getting some odd errors. I’m not 100% sure which combo is causing them, but I wanted to raise...

View Article

Image may be NSFW.
Clik here to view.

EdgeDB errors when using Rescript v12 on Deno with experimental web apis

jderochervlk: module InsertMovie = %edgeql(` What’s the file called where module InsertMovie = %edgeql( lives?

View Article


EdgeDB errors when using Rescript v12 on Deno with experimental web apis

db.res. I’ve tried different names and the same error appears. If the file is named data.res I get the error The module or file data__edgeql can't be found.. I am not importing or using the file...

View Article


EdgeDB errors when using Rescript v12 on Deno with experimental web apis

Ok, so if I change the name of the file to be uppercase, the error goes away. So Db.res or Data.res work, but db.res and data.res have this error.

View Article

EdgeDB errors when using Rescript v12 on Deno with experimental web apis

So it’s a problem in the edgedb rescript integration.

View Article

Image may be NSFW.
Clik here to view.

EdgeDB errors when using Rescript v12 on Deno with experimental web apis

Might be related to this issue with rescript embed lang github.com/zth/rescript-embed-lang Fix generated module name case zth:main ← tsnobip:fix_generated_module_name_case opened 10:34AM - 16 May 24...

View Article

RFC: Nested record definitions

A PoC of this that soon will be usable (hopefully) exists here: PoC of nested record definitions by zth · Pull Request #7241 · rescript-lang/rescript · GitHub

View Article


EdgeDB errors when using Rescript v12 on Deno with experimental web apis

I tried using ReScript v11 and the error still shows up. I can work with having the keep the file names uppercase for now.

View Article

EdgeDB errors when using Rescript v12 on Deno with experimental web apis

Yes, do that please, and it’ll hopefully be an easy fix.

View Article


Object update vs. Object.set

This sentence in the ReScript docs claims that ReScript objects are not update-able: “Disallowed unless the object is a binding that comes from the JavaScript side.” However, Object.set also exists,...

View Article

Object update vs. Object.set

The not update-able means x["foo"] = "bar" kind of update, as shown by this section of the doc: Object | ReScript Language Manual I always viewed Object.set as kind of a backdoor, since needing to use...

View Article


Image may be NSFW.
Clik here to view.

Object update vs. Object.set

I did feel off the paved path when I found & used Object.set I’m trying to use a query-string library and I’ve written the following ReScript binding: type queryString = {parse: string =>...

View Article

Object update vs. Object.set

This is actually why we’re differentiating between objects and dicts in ReScript (they’re both compiled to JS objects under the hood), dicts are meant to be used with dynamic keys as you’re doing here...

View Article

Image may be NSFW.
Clik here to view.

Object update vs. Object.set

Ah, good to know, thanks @tsnobip. I decided against URLSearchParams for some reason but I can’t remember why, so I’ll revisit Thanks all!

View Article
Browsing all 1739 articles
Browse latest View live