You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GenType: removed support for @genType.as in type definitions, which has become unnecessary. (#6099)
* Emit tags as strings.
* Allow more general type for tags.
Compile is_tag to `!== "object"` instead of `=== "string"`.
* Do not special case variants with only 1 case with payload.
Also the comment is not emitted anymore, since there's always a tag.
Not special casing means that the representation is uniform, and does not change when the type is extended. This is important with zero cost ffi, where the runtime representation is exposed to the user, to reduce possible surprises.
* Support @as("foo") to customize the representation of tags.
* Add support for @tag(...) to customize the property used for the tag.
* GenType: removed support for `@genType.as` which has become unnecessary.
* Restore res_syntax analysis
* Remove object converter.
* Remove conversion for variants.
* Emit the correct type for the variants runtime representation.
* Don't auto unbox variants with 1 payload.
* Refactor.
* Remove array converter
* Remove function converter.
* Allow recursive types.
Fixesrescript-association/genType#585
* Remove option converter.
* Remove some conversion code.
* Remove conversion code.
* Cleanup
* Dead code.
Copy file name to clipboardexpand all lines: CHANGELOG.md
+2
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,7 @@ These are only breaking changes for unformatted code.
47
47
- Remove deprecated module `Printexc`
48
48
-`@deriving(jsConverter)` not supported anymore for variant types https://github.com/rescript-lang/rescript-compiler/pull/6088
49
49
- New representation for variants, where the tag is a string instead of a number. https://github.com/rescript-lang/rescript-compiler/pull/6088
50
+
- GenType: removed support for `@genType.as` for records and variants which has become unnecessary. Use the language's `@as` instead to channge the runtime representation without requiring any runtime conversion during FFI.
50
51
51
52
#### :bug: Bug Fix
52
53
@@ -84,6 +85,7 @@ These are only breaking changes for unformatted code.
84
85
- Change the compilation of pattern matching for variants so it does not depends on variats being integers https://github.com/rescript-lang/rescript-compiler/pull/6085
85
86
- Improve code generated for string templates https://github.com/rescript-lang/rescript-compiler/pull/6090
86
87
- Move Jsx and JsxDOM and JsxEvent and JsxPPXReactSupport inside Pervasives and build them separately for curried and uncurried mode https://github.com/rescript-lang/rescript-compiler/pull/6091
88
+
- Gentype: allow recursive data types https://github.com/rescript-association/genType/issues/585
0 commit comments