Skip to content

Conversation

Josef-Thorne-A
Copy link
Contributor

@Josef-Thorne-A Josef-Thorne-A commented Sep 3, 2025

This adds an initial version of documentation for GADTs with a thorough tutorial.
I edited this from my original forum post for clarity and added a practical
example -- writing bindings to Node's stream API.

Feedback and further refinement welcome!
fixes: #153

@fhammerschmidt
Copy link
Member

Sorry for the format check shenanigans - should be fixed when you update to the latest master commit now.
Will do a thorough review later tonight.

Ignore format check of API json files (rescript-lang#1097)
Copy link
Member

@fhammerschmidt fhammerschmidt left a comment

Choose a reason for hiding this comment

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

Amazing!

Besides my comments, can you please make all code camelCased?

Usually, we try to be a bit more concise with our docs, but here understanding the big picture is key so I found it quite nice how it is.

@Josef-Thorne-A
Copy link
Contributor Author

Thanks for the feedback -- I think I managed to get everything. Regarding the RWO reference, I removed any direct mention of OCaml -- just a quick footnote linking the RWO chapter.

Copy link
Member

@fhammerschmidt fhammerschmidt left a comment

Choose a reason for hiding this comment

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

Great stuff! Thank you so much!

@fhammerschmidt fhammerschmidt merged commit 7ced1f0 into rescript-lang:master Sep 5, 2025
1 check passed
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.

Document GADTs
2 participants