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 ArticleModule-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 ArticleI'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 ArticleI'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 ArticleGive 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 ArticleEdgeDB 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 ArticleEdgeDB 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 ArticleEdgeDB 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 ArticleEdgeDB 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 ArticleEdgeDB errors when using Rescript v12 on Deno with experimental web apis
So it’s a problem in the edgedb rescript integration.
View ArticleEdgeDB 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 ArticleRFC: 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 ArticleEdgeDB 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 ArticleEdgeDB errors when using Rescript v12 on Deno with experimental web apis
Yes, do that please, and it’ll hopefully be an easy fix.
View ArticleObject 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 ArticleObject 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 ArticleObject 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 ArticleObject 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 ArticleObject 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