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

Possible support for multiply-indexed data types? #24

Open
cgibbard opened this issue May 25, 2020 · 3 comments
Open

Possible support for multiply-indexed data types? #24

cgibbard opened this issue May 25, 2020 · 3 comments

Comments

@cgibbard
Copy link
Contributor

If presented with:

data Query t r where
  Query_Foo :: Query String Int

Should we generate FromJSON (Some (Some Query)) ?

@ryantrinkle
Copy link
Member

It'd be nice to have the option to generate thatl, although I think the user probably ought to be explicit about how many Some wrappers they want

@cgibbard
Copy link
Contributor Author

Yeah it would be possible to infer, but probably confusing for someone who didn't know what to expect.

@ryantrinkle
Copy link
Member

Yeah, I think of instances similarly to binding variables (just with really structured variable names), and so I think, in the same way, we want to be pretty clear about what the splice is "binding".

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

No branches or pull requests

2 participants