Skip to content

Restrict props to Record #119

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

Closed
natefaubion opened this issue Oct 6, 2017 · 3 comments
Closed

Restrict props to Record #119

natefaubion opened this issue Oct 6, 2017 · 3 comments

Comments

@natefaubion
Copy link
Contributor

You are guaranteed buggy behavior otherwise.

@coot
Copy link

coot commented Oct 7, 2017

Indeed, we could wrap props in a record like it is dome with the state already. Just limiting to records will rule out newtype wrappers of records (or we could type check this with a type class).

@coot
Copy link

coot commented Oct 7, 2017

We could wait for instance chains in 11.6.0 and use something as simple as this:

class IsRecord a

instance recordIsRecord :: IsRecord {|r}
else instance newtypeRecordIsRecord :: Newtype a {|r} => IsRecord a

@ethul
Copy link
Contributor

ethul commented Mar 4, 2018

Closed by #129

@ethul ethul closed this as completed Mar 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants