This repository has been archived by the owner on Jun 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Fix conversion of Js.t containing an alias core type #263
Comments
Guess no need anymore after rescript-lang/rescript#4967 |
chenglou
added a commit
to chenglou/syntax
that referenced
this issue
Feb 27, 2021
Fixes rescript-lang#277 Fixes rescript-lang#263 Now that rescript-lang/rescript#4967 has landed: - Parse `{"foo": int}` as ocaml `{. foo: int}`. Previously it parsed into ocaml `{. foo: int} Js.t` - Remove a tiny printing optimizations for `Js.t`. - For React's PPX 3, generate objects directly instead of `Js.t` objects. cc @rickyvetter @ryyppy for ppx4. - The re->res converter automatically removes the `Js.t` part. - Said converter has a bug (rescript-lang#263) that converts `Js.t({..}) as 'a` into `{..} as 'a` from naturally forgetting to special-case that path. Now this bug is conveniently ~~made into a feature~~ obsolete.
chenglou
added a commit
to chenglou/syntax
that referenced
this issue
Feb 27, 2021
Fixes rescript-lang#277 Fixes rescript-lang#263 Now that rescript-lang/rescript#4967 has landed: - Parse `{"foo": int}` as ocaml `{. foo: int}`. Previously it parsed into ocaml `{. foo: int} Js.t` - Remove a tiny printing optimizations for `Js.t`. - For React's PPX 3, generate objects directly instead of `Js.t` objects. cc @rickyvetter @ryyppy for ppx4. - The re->res converter automatically removes the `Js.t` part. - Said converter has a bug (rescript-lang#263) that converts `Js.t({..}) as 'a` into `{..} as 'a` from naturally forgetting to special-case that path. Now this bug is conveniently ~~made into a feature~~ obsolete.
chenglou
added a commit
that referenced
this issue
Feb 27, 2021
Fixes #277 Fixes #263 Now that rescript-lang/rescript#4967 has landed: - Parse `{"foo": int}` as ocaml `{. foo: int}`. Previously it parsed into ocaml `{. foo: int} Js.t` - Remove a tiny printing optimizations for `Js.t`. - For React's PPX 3, generate objects directly instead of `Js.t` objects. cc @rickyvetter @ryyppy for ppx4. - The re->res converter automatically removes the `Js.t` part. - Said converter has a bug (#263) that converts `Js.t({..}) as 'a` into `{..} as 'a` from naturally forgetting to special-case that path. Now this bug is conveniently ~~made into a feature~~ obsolete.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The
Js.t({..} as 'a)
part is problematic. There's currently no way to express this in ReScript.{..}
is the syntax forJs.t({..})
. So technically{..} as 'a
(rescript), representsJs.t({..)) as 'a
.However in the above code the alias sits inside the
Js.t
.The text was updated successfully, but these errors were encountered: