Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

clean up object types handling #277

Closed
bobzhang opened this issue Feb 25, 2021 · 0 comments · Fixed by #291
Closed

clean up object types handling #277

bobzhang opened this issue Feb 25, 2021 · 0 comments · Fixed by #291

Comments

@bobzhang
Copy link
Member

Currently {"x" : int } is parsed as <x : int > Js.t,
on the master Js.t is a nop type 'a t = 'a.
The parser can just parse it as < x : int >

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.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant