Skip to content

Use polymorphic variant for Platform.os - #771

Merged
MoOx merged 1 commit into
mainfrom
platform-polyvar
Oct 5, 2022
Merged

Use polymorphic variant for Platform.os#771
MoOx merged 1 commit into
mainfrom
platform-polyvar

Conversation

@cknitt

@cknitt cknitt commented Sep 15, 2022

Copy link
Copy Markdown
Member

While we are at it, here is another breaking change that we could release with the ReScript 10 version.

Since polymorphic variants are compiled to strings, we can make Platform.os a polymorphic variant, enabling pattern matching on it.

@cknitt cknitt added this to the 0.70 / rescript 10 milestone Sep 15, 2022
@cknitt
cknitt requested a review from MoOx September 15, 2022 17:20

@MoOx MoOx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great ! Thanks again !

@MoOx
MoOx merged commit b189fbc into main Oct 5, 2022
@MoOx
MoOx deleted the platform-polyvar branch October 5, 2022 13:26
MoOx added a commit that referenced this pull request Oct 5, 2022
* main:
  Use polymorphic variant for Platform.os (#771)
  Get rid of @string/@int for polyvars (#770)
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.

2 participants