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

Make Chan.t and Task.promise injective #69

Merged
merged 1 commit into from
Apr 6, 2022
Merged

Make Chan.t and Task.promise injective #69

merged 1 commit into from
Apr 6, 2022

Conversation

favonia
Copy link
Contributor

@favonia favonia commented Apr 4, 2022

The injectivity annotations will make these type constructors immediately usable as indexes of GADTs. In particular, the GADT Effect.t.

@kayceesrk
Copy link
Contributor

This should be looked at by someone who understands this stuff. Perhaps @dra27?

@dra27
Copy link

dra27 commented Apr 5, 2022

Actually, I'd bat questions of injectivity to @yallop, if he has a minute 🙂

Copy link

@yallop yallop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks sensible to me. The benefit, as @favonia says, is that it makes these types usable in GADT indexes. The drawbacks: there aren't any, really; it'll no longer be possible to change the implementation types to aliases that ignore the parameters (like type 'a promise = int), but it's difficult to imagine that that'd be useful.

@kayceesrk
Copy link
Contributor

Thanks @yallop!

@kayceesrk kayceesrk merged commit b8781bc into ocaml-multicore:master Apr 6, 2022
@favonia favonia deleted the injectivity-annotation branch April 6, 2022 12:01
kit-ty-kate pushed a commit to ocaml/opam-repository that referenced this pull request Oct 11, 2022
CHANGES:

This release includes:

* Bug fix for `parallel_for_reduce` on empty loops.
* Make Chan.t and Task.promise injective ocaml-multicore/domainslib#69
* Add lockfree dependency ocaml-multicore/domainslib#70
* CI fixes (ocaml-multicore/domainslib#73, ocaml-multicore/domainslib#76)
* Breaking change: Rename `num_additional_domains` to `num_domains` for setup_pool
* Documentation updates (ocaml-multicore/domainslib#80, ocaml-multicore/domainslib#81, ocaml-multicore/domainslib#82)
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.

4 participants