Skip to content

Conversation

anmonteiro
Copy link
Member

@anmonteiro anmonteiro commented Oct 19, 2023

Looks like there's a missing commit from rescript-lang/rescript#4967 that we must have forgotten to revert: rescript-lang/rescript@ee283b0

I'm going to do another pass over the full PR and make sure we're not missing anything else.

fixes #758

@anmonteiro anmonteiro force-pushed the anmonteiro/js-t-abstract branch from 3800d30 to 1a041b5 Compare October 19, 2023 04:39
@anmonteiro
Copy link
Member Author

1b9691d fixes the tests for this change, but I'm not sure why Js.Obj.empty () has weak variables. I guess that makes sense?

@@ -5,14 +5,12 @@ Test `@mel.unwrap` in `@mel.obj`
> external func :
> param:string ->
> polyParam:([ \`Str of string | \`Int of int ][@mel.unwrap]) ->
> unit ->
> _ Js.t = ""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a regression. Shouldn't mel.obj return a 'a Js.t value?

Copy link
Member Author

@anmonteiro anmonteiro Oct 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's still a Js.t, but it gets around the weak type variable warning

@anmonteiro anmonteiro force-pushed the anmonteiro/js-t-abstract branch from 1b9691d to 6e96d04 Compare October 19, 2023 21:02
@anmonteiro anmonteiro merged commit 1167ca7 into main Oct 19, 2023
@anmonteiro anmonteiro deleted the anmonteiro/js-t-abstract branch October 19, 2023 22:13
anmonteiro added a commit to anmonteiro/opam-repository that referenced this pull request Oct 22, 2023
CHANGES:

- Add TRMC (Tail Recursion Modulo Cons) support
  ([melange-re/melange#743](melange-re/melange#743))
- [playground]: Add `melange.dom` to bundle
  ([melange-re/melange#779](melange-re/melange#779))
- Fix `Sys.argv` runtime to match declared type
  ([melange-re/melange#791](melange-re/melange#791))
- Make `'a Js.t` abstract (again), fixing a regression when bringing back
  OCaml-style objects BuckleScript
  ([melange-re/melange#786](melange-re/melange#786))
- Don't issue "unused attribute" warning for well-formed `@@@mel.config` in
  interface files ([melange-re/melange#800](melange-re/melange#800))
- Stop showing `Js__.Js_internal` in types and error messages
  ([melange-re/melange#798](melange-re/melange#798))
- Fix printing of OCaml-style objects and uncurried application
  ([melange-re/melange#807](melange-re/melange#807))
nberth pushed a commit to nberth/opam-repository that referenced this pull request Jun 18, 2024
CHANGES:

- Add TRMC (Tail Recursion Modulo Cons) support
  ([melange-re/melange#743](melange-re/melange#743))
- [playground]: Add `melange.dom` to bundle
  ([melange-re/melange#779](melange-re/melange#779))
- Fix `Sys.argv` runtime to match declared type
  ([melange-re/melange#791](melange-re/melange#791))
- Make `'a Js.t` abstract (again), fixing a regression when bringing back
  OCaml-style objects BuckleScript
  ([melange-re/melange#786](melange-re/melange#786))
- Don't issue "unused attribute" warning for well-formed `@@@mel.config` in
  interface files ([melange-re/melange#800](melange-re/melange#800))
- Stop showing `Js__.Js_internal` in types and error messages
  ([melange-re/melange#798](melange-re/melange#798))
- Fix printing of OCaml-style objects and uncurried application
  ([melange-re/melange#807](melange-re/melange#807))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiler conflates object types with Js.t object types
2 participants