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

Intersection types #14

Open
rrdelaney opened this issue Jul 10, 2017 · 2 comments
Open

Intersection types #14

rrdelaney opened this issue Jul 10, 2017 · 2 comments

Comments

@rrdelaney
Copy link
Owner

The type A & B will combine record types in Flow, we should also support it

@bbqbaron
Copy link
Collaborator

I'd like to start on this. Not knowing as much as I should about Ocaml, though, can I ask for a high-level approach description? I don't see a way for Ocaml to declare an intersection record type using something like &. I could certainly hand-construct an intersection of any two given types, but not declare the type relationship between some 'a and 'b in, say:

external mergeThings: 'a => 'b => ??? = "" [@@bs.module "stuff"];

How would this be accomplished?

@rrdelaney
Copy link
Owner Author

I don't really know either 😕 Maybe something like a type spread?

If you're looking for something pretty do-able #15 might be a good option 🙂

@rrdelaney rrdelaney added this to the 0.11 milestone Jul 29, 2017
@rrdelaney rrdelaney removed this from the 0.11 milestone Aug 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants