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 #20

Merged
merged 1 commit into from Dec 5, 2020

Conversation

kl0tl
Copy link
Contributor

@kl0tl kl0tl commented Jul 19, 2020

This prevents terms of type Bus cap1 a to be coerced to type Bus cap2 b but allows to coerce terms of type Bus cap a to type Bus cap b when Coercible a b holds, hence allowing the zero cost coerce to read and write newtypes from/to a bus for instance. The nominal role ensures a readonly bus cannot be coerced to a readwrite or a writable one.

@thomashoneyman thomashoneyman merged commit a2a4af5 into purescript-contrib:main Dec 5, 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.

None yet

3 participants