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 index :: ReadForeign a => Number -> ForeignParser a #7

Merged
merged 2 commits into from
Jul 29, 2014
Merged

Add index :: ReadForeign a => Number -> ForeignParser a #7

merged 2 commits into from
Jul 29, 2014

Conversation

philopon
Copy link
Contributor

This PR allows parsing hetero list.

Please read examples/JSONHeteroArrays.purs file.

@garyb
Copy link
Member

garyb commented Jul 29, 2014

Thanks, index looks good 👍

I'm not totally convinced providing a default readTuple is the right thing to do as well, but I guess a 2-item JS array would be the most sensible default for this if we are going to provide one. What do you think @paf31?

I guess that can be overridden with a newtype elsewhere now if needed, so it's probably fine.

@paf31
Copy link
Contributor

paf31 commented Jul 29, 2014

index looks good.

Is readTuple even used here? I'd prefer to keep it out of the core library if possible, especially without a newtype wrapper, since I don't think there is a single best default tuple instance. I feel like this sort of thing would be best kept in libraries.

Final call is yours though @garyb of course.

@garyb
Copy link
Member

garyb commented Jul 29, 2014

Yeah, that was pretty much what I was thinking.

@philopon can you update the PR to remove readTuple please.

@philopon
Copy link
Contributor Author

Okay, I removed it. please check it.

@garyb
Copy link
Member

garyb commented Jul 29, 2014

Thanks!

garyb added a commit that referenced this pull request Jul 29, 2014
Add index :: ReadForeign a => Number -> ForeignParser a
@garyb garyb merged commit d25c385 into purescript:master Jul 29, 2014
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.

None yet

3 participants