Skip to content

Commit 0fda855

Browse files
committed
fix: avoid new dep on iostream
1 parent 050cd38 commit 0fda855

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/lib/proof3/dune

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
(preprocess
1414
(pps ppx_deriving.std imandrakit.twine.ppx imandrakit.typereg.ppx))
1515
(libraries
16-
iostream
1716
imandrakit
1817
imandrax-api
1918
imandrax-api.common

src/lib/proof3/writer.ml

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class dummy : t =
4141
method write_entrypoint (_ : Entrypoint.t) = ()
4242
end
4343

44-
class twine (out : #Iostream.Out.t) : t =
44+
class twine (out : #Imandrakit_twine.Encode.out) : t =
4545
let enc = Imandrakit_twine.Encode.create () in
4646
let wrote_entrypoint = ref false in
4747

@@ -81,6 +81,6 @@ class twine (out : #Iostream.Out.t) : t =
8181
check_entrypoint_not_written ();
8282
wrote_entrypoint := true;
8383
let off = Entrypoint.to_twine enc e in
84-
let data = Imandrakit_twine.Encode.finalize_copy enc ~entrypoint:off in
85-
Iostream.Out.output_string out data
84+
let slice = Imandrakit_twine.Encode.finalize enc ~entrypoint:off in
85+
out#output slice.bs 0 slice.len
8686
end

0 commit comments

Comments
 (0)