Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add roles declarations to allow safe coercions #175

Merged
merged 1 commit into from
Dec 6, 2020

Conversation

kl0tl
Copy link
Contributor

@kl0tl kl0tl commented Sep 12, 2020

This allows terms of type ReactThis props state, ReactClass props, Ref a, RefHandler a and SyntheticEvent_ event to be coerced to type ReactThis props' state', ReactClass props', Ref b, RefHandler b and SyntheticEvent_ event' when Coercible props props', Coercible state state', Coercible a b and Coercible event event' hold, hence allowing the zero cost coerce to introduce and eliminate newtypes in components props and state, refs and their handlers and synthetic events for instance.

@JordanMartinez
Copy link
Contributor

This should build now, but might need to be rebased on top of current main

@kl0tl kl0tl force-pushed the roles-declarations branch from 36cbd49 to fbd7cb5 Compare December 5, 2020 16:04
@thomashoneyman thomashoneyman merged commit 3c7e5a2 into purescript-contrib:main Dec 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants