Quantcast
Browsing all 1787 articles
Browse latest View live

genType for core library

I’m on alpha.11 and it doesn’t seem to be fixed. It just generates: import type {JSON_t as Stdlib_JSON_t} from './Stdlib.gen.ts'; Which I handle by just putting a manual Stdlib.gen.ts file in the same...

View Article


Image may be NSFW.
Clik here to view.

genType for core library

oops sorry, the fix is indeed in alpha.12 that is not released yet: github.com/rescript-lang/rescript Fix issue with gentype and stdlib json. rescript-lang:master ← rescript-lang:gentype-json opened...

View Article


Need help with binding to a function with a complex type

I overcomplicated things a bit by using a generalized abstract data type (or GADT) for parameterTypeKeys and objects for the parsing result, objects being the structural equivalent of records in...

View Article

Is Obj being deprecated in its entirety?

In Obj, there are now deprecation warnings all over (except on t and magic?) I use Obj.t as a signifier of “typeless” object references in exceptions regularly. To me, it’s an ergonomic way to store...

View Article

Is Obj being deprecated in its entirety?

Could you give a full example? We generally think the naming is bad and want to use something more descriptive, first and foremost. Renaming suggestions for both the module and the functions you use...

View Article


Is Obj being deprecated in its entirety?

I typically use JSON.t for unknown objects and unknown for things that I’ll never look at or only log

View Article

Image may be NSFW.
Clik here to view.

Introducing Bibimbob: VSCode Extension for ReScript Dependency Visualization

New features have been added in version v0.8.0: Value Usage Count Annotation: shows usage counts for let bindings, helping you identify unused or rarely used code. github.com...

View Article

Is Obj being deprecated in its entirety?

exception EncodeError({obj: Obj.t, reason: string}) exception DecodeError({ doc: BSON.t, key: string, value: option<Obj.t>, reason: string, exc: option<Printexc.t>, }) this is how i use...

View Article


Is Obj being deprecated in its entirety?

unknown looks like a good fit for this!

View Article


Is Obj being deprecated in its entirety?

I actually didn’t known unknown existed as a built-in. How do I coerce a type to it?

View Article

Is Obj being deprecated in its entirety?

well, unfortunately for now you’d still have to use Obj.magic for this, or an identity external. I’d like to have coercion of all types to unknown, hopefully this will be added in v12.

View Article

Is Obj being deprecated in its entirety?

Great, looking forward to it. I usually end up sprinkling Obj.magic throughout the code which I don’t really appreciate. They work as a sort of “this stuff is unsafe” greppable marker, but...

View Article

Is Obj being deprecated in its entirety?

The semantics of Obj.t is close to JavaScript’s Object, which is actually the top type. So the belief that unknown is safer than Obj.t is a myth, because there’s very little the compiler can do about...

View Article


Is Obj being deprecated in its entirety?

right, what I’m saying is that transforming to any top-type (unknown or something else) is safe, and that’s why I want to avoid use Obj.magic, which I use as a “this stuff is not safe” marker. that’s...

View Article

Is Obj being deprecated in its entirety?

Yes, I understand your intention. I have my own MessagePack decoder for TypeScript written in ReScript. github.com daangn/urlpack/blob/main/packages/msgpack/src/decoder.res open Js open TypedArray2...

View Article


Is Obj being deprecated in its entirety?

Thanks for your feedback, it’s valid but it also addresses things beyond my question. I would change to BSON.t but they’re unfortunately different from BSON.value. The codec is rather hacky atm, but...

View Article

Is Obj being deprecated in its entirety?

Either way, is Obj being deprecated? Why isn’t Obj.t being deprecated, but everything else (except Obj.magic) is? Obj is a name from OCaml, so I think yes. I wanted to deprecate entirely, but it’s...

View Article


Is Obj being deprecated in its entirety?

I do like the idea of adding a function that converts any type to unknown. It seems very useful.

View Article

Compiler hanging on v11.4 with uncurried enabled

Hello there ! I’m updating our modules to the latest ReScript version (from 11.0.0 curried to 11.1.4 uncurried) and I noticed that API module won’t compile as it hang on some files and my processor...

View Article

Compiler hanging on v11.4 with uncurried enabled

I haven’t heard of similar experiences, could you maybe try to come up with a minimal repro? Could be related to the usage of PPXes. Do you use the built-in rescript builder or rewatch?

View Article
Browsing all 1787 articles
Browse latest View live