From f845f1265bba6ade5fa0240216857a7dcd9540b6 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Thu, 8 Jun 2023 00:23:59 -0400 Subject: [PATCH] compat: use Eio_unix.Stdenv.base --- examples/echo_eio.ml | 2 +- src/eio/dune | 2 +- src/eio/tiny_httpd_eio.ml | 5 +++-- src/eio/tiny_httpd_eio.mli | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/echo_eio.ml b/examples/echo_eio.ml index 5318e8e5..93deb1e9 100644 --- a/examples/echo_eio.ml +++ b/examples/echo_eio.ml @@ -56,7 +56,7 @@ let () = (* create server *) let server : S.t = S_eio.create ~port:!port_ ~max_connections:!j - ~stdenv:(stdenv :> Eio.Stdenv.t) + ~stdenv:(stdenv :> Eio_unix.Stdenv.base) ~sw () in diff --git a/src/eio/dune b/src/eio/dune index 5ecf5128..37431aba 100644 --- a/src/eio/dune +++ b/src/eio/dune @@ -4,5 +4,5 @@ (public_name tiny_httpd_eio) (synopsis "An EIO-based backend for Tiny_httpd") (flags :standard -safe-string -warn-error -a+8) - (libraries tiny_httpd eio)) + (libraries tiny_httpd eio eio.unix)) diff --git a/src/eio/tiny_httpd_eio.ml b/src/eio/tiny_httpd_eio.ml index 698a386a..bbcf7a9d 100644 --- a/src/eio/tiny_httpd_eio.ml +++ b/src/eio/tiny_httpd_eio.ml @@ -7,7 +7,7 @@ type 'a with_args = ?addr:string -> ?port:int -> ?max_connections:int -> - stdenv:Eio.Stdenv.t -> + stdenv:Eio_unix.Stdenv.base -> sw:Eio.Switch.t -> 'a @@ -94,7 +94,8 @@ let oc_of_flow (flow : Eio.Net.stream_socket) : IO.Out_channel.t = { IO.Out_channel.close; flush; output } let io_backend ?(addr = "127.0.0.1") ?(port = 8080) ?max_connections - ~(stdenv : Eio.Stdenv.t) ~(sw : Eio.Switch.t) () : (module H.IO_BACKEND) = + ~(stdenv : Eio_unix.Stdenv.base) ~(sw : Eio.Switch.t) () : + (module H.IO_BACKEND) = let module M = struct let init_addr () = addr let init_port () = port diff --git a/src/eio/tiny_httpd_eio.mli b/src/eio/tiny_httpd_eio.mli index c79f0525..487b3a84 100644 --- a/src/eio/tiny_httpd_eio.mli +++ b/src/eio/tiny_httpd_eio.mli @@ -4,7 +4,7 @@ type 'a with_args = ?addr:string -> ?port:int -> ?max_connections:int -> - stdenv:Eio.Stdenv.t -> + stdenv:Eio_unix.Stdenv.base -> sw:Eio.Switch.t -> 'a