ocaml-multicore / eio

Effects-based direct-style IO for multicore OCaml
Other
559 stars 72 forks source link

Relax return types of Eio.Process.pipe #767

Closed Arogbonlo closed 1 month ago

Arogbonlo commented 1 month ago

This updates the pipe function in the Make_mgr module to use polymorphic variants for its return types. The change allows the returned source and sink to be compatible with APIs expecting monomorphic types. Change:

This addresses issue #750, improving flexibility when working with various APIs that use stricter type definitions for sources and sinks.

patricoferris commented 1 month ago

Hey @Arogbonlo,

Thanks for the PR. There are a few issues here that need addressed:

I think perhaps you should start again updating the types in lib_eio/process.{ml.mli} and following this through to eio_unix. I think you are also going to need to update the Pipe effect in lib_eio/unix/private.ml too. No other parts of the types should be changed (e.g. you changed _ mgr to 'a t)

Arogbonlo commented 1 month ago

I'll effect them immediately. Thank you. @patricoferris

patricoferris commented 1 month ago

Hey @Arogbonlo how's it going? Do you need any help?

Arogbonlo commented 1 month ago

Hey @Arogbonlo how's it going? Do you need any help?

Thank you so much for the check!

I'll push my progress in a few hours, so you can check it and let me know where i have to make changes.

Arogbonlo commented 1 month ago

Hey @patricoferris

I just made a commit, please I'll appreciate your feedback on it.

Thank you.