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

Shutdown kind variance #50

Closed
reynir opened this issue Dec 21, 2023 · 0 comments
Closed

Shutdown kind variance #50

reynir opened this issue Dec 21, 2023 · 0 comments

Comments

@reynir
Copy link
Member

reynir commented Dec 21, 2023

The signature of shutdown is as follows:

val shutdown : flow -> [ `read | `write | `read_write ] -> unit Lwt.t

It would be slightly more ergonomic if the variant was [< `read | `write | `read_write ] instead as you may need coercion in some places now.

I don't think it is worth making a strictly speaking breaking change for such a small thing. We can save it for when we need to make another breaking change in the future.

hannesm added a commit to hannesm/mirage-flow that referenced this issue Feb 8, 2024
hannesm added a commit that referenced this issue Feb 8, 2024
add coercion for shutdown variant, as suggested by @reynir in #50
@hannesm hannesm closed this as completed Feb 8, 2024
hannesm added a commit to hannesm/opam-repository that referenced this issue Feb 8, 2024
CHANGES:

- move Mirage_flow.stats and pp_stats to Mirage_flow_combinators (mirage/mirage-flow#51 @hannesm)
- improve documentation of expected semantics (when write promise is resolved,
  what is done to the underlying flow - addresses mirage/mirage-flow#4 @samoht),
  (mirage/mirage-flow#51 @reynir @dinosaure @hannesm)
- add < coercion to shutdown:
  ``shutdown : flow -> [< `read | `write | `read_write ] -> unit Lwt.t``
  (requested mirage/mirage-flow#50 @reynir, mirage/mirage-flow#52 @hannesm)
hannesm added a commit to hannesm/opam-repository that referenced this issue Feb 8, 2024
CHANGES:

- move Mirage_flow.stats and pp_stats to Mirage_flow_combinators (mirage/mirage-flow#51 @hannesm)
- improve documentation of expected semantics (when write promise is resolved,
  what is done to the underlying flow - addresses mirage/mirage-flow#4 @samoht),
  (mirage/mirage-flow#51 @reynir @dinosaure @hannesm)
- add < coercion to shutdown:
  ``shutdown : flow -> [< `read | `write | `read_write ] -> unit Lwt.t``
  (requested mirage/mirage-flow#50 @reynir, mirage/mirage-flow#52 @hannesm)
hannesm added a commit that referenced this issue Feb 8, 2024
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