Skip to content

Commit 6fb383e

Browse files
hannesmsamoht
authored andcommitted
cohttp-mirage: support conduit 8.0.0
1 parent 2d6b7b7 commit 6fb383e

File tree

6 files changed

+11
-25
lines changed

6 files changed

+11
-25
lines changed

cohttp-mirage.opam

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ depends: [
3131
"ocaml" {>= "4.08"}
3232
"mirage-flow" {>= "2.0.0"}
3333
"mirage-channel" {>= "4.0.0"}
34-
"conduit" {>= "2.0.2"}
35-
"conduit-mirage" {>= "2.3.0"}
34+
"conduit" {>= "8.0.0"}
35+
"conduit-mirage" {>= "8.0.0"}
3636
"mirage-kv" {>= "3.0.0"}
3737
"lwt" {>= "2.4.3"}
3838
"cohttp-lwt" {= version}

cohttp-mirage/src/client.ml

+2-6
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,8 @@
1717
* %%NAME%% %%VERSION%%
1818
*)
1919

20-
module Make
21-
(P : Mirage_clock.PCLOCK)
22-
(R : Resolver_mirage.S)
23-
(S : Conduit_mirage.S) =
24-
struct
25-
module Net = Net.Make (P) (R) (S)
20+
module Make (R : Resolver_mirage.S) (S : Conduit_mirage.S) = struct
21+
module Net = Net.Make (R) (S)
2622
module Connection = Cohttp_lwt.Connection.Make (Net)
2723
include Cohttp_lwt.Client.Make (Connection)
2824

cohttp-mirage/src/client.mli

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
module Make
2-
(_ : Mirage_clock.PCLOCK)
3-
(R : Resolver_mirage.S)
4-
(S : Conduit_mirage.S) : sig
1+
module Make (R : Resolver_mirage.S) (S : Conduit_mirage.S) : sig
52
module Connection : Cohttp_lwt.S.Connection
63
include Cohttp_lwt.S.Client with type ctx = Connection.Net.ctx
74

cohttp-mirage/src/net.ml

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
module Make
2-
(P : Mirage_clock.PCLOCK)
3-
(R : Resolver_mirage.S)
4-
(S : Conduit_mirage.S) =
5-
struct
1+
module Make (R : Resolver_mirage.S) (S : Conduit_mirage.S) = struct
62
module Channel = Mirage_channel.Make (S.Flow)
73
module Input_channel = Input_channel.Make (Channel)
8-
module Endpoint = Conduit_mirage.Endpoint (P)
94
module IO = Io.Make (Channel)
105
open IO
116

@@ -28,7 +23,8 @@ struct
2823
let resolve ~ctx uri = R.resolve_uri ~uri ctx.resolver
2924

3025
let connect_endp ~ctx endp =
31-
Endpoint.client ?tls_authenticator:ctx.authenticator endp >>= fun client ->
26+
Conduit_mirage.Endpoint.client ?tls_authenticator:ctx.authenticator endp
27+
>>= fun client ->
3228
match ctx.conduit with
3329
| None -> failwith "conduit not initialised"
3430
| Some c ->

cohttp-mirage/src/net.mli

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
module Make
2-
(_ : Mirage_clock.PCLOCK)
3-
(R : Resolver_mirage.S)
4-
(S : Conduit_mirage.S) : sig
1+
module Make (R : Resolver_mirage.S) (S : Conduit_mirage.S) : sig
52
type ctx = {
63
resolver : R.t;
74
conduit : S.t option;

dune-project

+2-2
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@
218218
(mirage-channel
219219
(>= 4.0.0))
220220
(conduit
221-
(>= 2.0.2))
221+
(>= 8.0.0))
222222
(conduit-mirage
223-
(>= 2.3.0))
223+
(>= 8.0.0))
224224
(mirage-kv
225225
(>= 3.0.0))
226226
(lwt

0 commit comments

Comments
 (0)