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 forbid unsafe coercions #120

Merged
merged 1 commit into from
Dec 12, 2020

Conversation

kl0tl
Copy link
Contributor

@kl0tl kl0tl commented Sep 12, 2020

This allows terms of type Key a to be coerced to type Key b when Coercible a b holds but prevents terms of type Size a and Angle a to be coerced to type Size b and Angle b. The reasoning being that keys of some type can be associated to to terms of types with the same representation but not arbitrary types and values with absolute or relative sizes and angles in degrees or radians don’t describe the same runtime values.

@thomashoneyman thomashoneyman changed the base branch from master to main October 6, 2020 03:08
@thomashoneyman thomashoneyman added the purs-0.14 A reminder to address this issue or merge this PR before we release PureScript v0.14.0 label Dec 10, 2020
@thomashoneyman thomashoneyman merged commit c9592dc into purescript-contrib:main Dec 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
purs-0.14 A reminder to address this issue or merge this PR before we release PureScript v0.14.0
Development

Successfully merging this pull request may close these issues.

2 participants