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 SubRow class #21

Closed
wants to merge 1 commit into from
Closed

Add SubRow class #21

wants to merge 1 commit into from

Conversation

coot
Copy link

@coot coot commented Aug 24, 2017

I need SubRow class for: purescript/purescript-record#5

@paf31
Copy link
Contributor

paf31 commented Aug 24, 2017

Why not use Union directly? This class doesn't add any new laws or behavior.

@coot
Copy link
Author

coot commented Aug 24, 2017

good point, indeed.

@coot coot closed this Aug 24, 2017
@coot coot deleted the subrow branch September 5, 2017 07:12
@matthewleon
Copy link
Contributor

I feel like this has ergonomic value to library users: it requires one less variable definition in your forall, and it somewhat clarifies your intentions. One place I would find this useful, for example, is in replacing use of Options from purescript-options with a simple SubRow r OptionsRow.

It's a bit more readable than Union r r' OptionsRow.

@matthewleon
Copy link
Contributor

matthewleon commented Nov 20, 2017

Here is an example of what I'm going for. I really think SubRow makes this much more readable: http://try.purescript.org/?session=062a58b9-1bb1-b95d-2feb-b40bf47814b1&backend=core&gist=804bad033e33970e6ba10f84b669107e

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.

3 participants