Skip to content

Commit 7aded45

Browse files
committed
Apply new Stream types in relevant modules;
1 parent a1825dd commit 7aded45

File tree

18 files changed

+846
-4574
lines changed

18 files changed

+846
-4574
lines changed

src/Console.re

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ type consoleOptions;
88
[@bs.obj]
99
external consoleOptions:
1010
(
11-
~stdout: Stream.Writable.subtype('w, 'r, 'a),
12-
~stderr: Stream.Writable.subtype('w, 'r, 'a)=?,
11+
~stdout: Stream.Writable.subtype('w, 'a),
12+
~stderr: Stream.Writable.subtype('w, 'a)=?,
1313
~ignoreErrors: bool=?,
1414
~colorMode: bool=?,
1515
~inspectOptions: Util.inspectOptions=?,
@@ -20,7 +20,7 @@ external consoleOptions:
2020
[@bs.new] [@bs.module "console"]
2121
external make: consoleOptions => t = "Console";
2222
[@bs.new] [@bs.module "console"]
23-
external make2: {.. "stdout": Stream.Writable.subtype('w, 'r, 'a)} => t =
23+
external make2: {.. "stdout": Stream.Writable.subtype('w, 'a)} => t =
2424
"Console";
2525

2626
[@bs.send] external assert_: (t, bool) => unit = "assert";

src/Console__.re

Lines changed: 0 additions & 73 deletions
This file was deleted.

src/Crypto.re

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,10 @@ module PublicKey = {
6161
};
6262

6363
module Hash = {
64-
type kind = [ Stream.transform | `Hash];
65-
type subtype('w, 'r, 'a) =
66-
Stream.Transform.subtype('w, 'r, [> kind] as 'a);
67-
type supertype('w, 'r, 'a) = Stream.subtype('w, 'r, [< kind] as 'a);
68-
type t = subtype(Buffer.t, Buffer.t, kind);
64+
type kind('w, 'r) = [ Stream.transform('w, 'r) | `Hash];
65+
type subtype('w, 'r, 'a) = Stream.subtype([> kind('w, 'r)] as 'a);
66+
type supertype('w, 'r, 'a) = Stream.subtype([< kind('w, 'r)] as 'a);
67+
type t = subtype(Buffer.t, Buffer.t, kind('w, 'r));
6968
module Impl = {
7069
include Stream.Transform.Impl;
7170
[@bs.send] external copy: t => t = "copy";
@@ -78,11 +77,10 @@ module Hash = {
7877
[@bs.module "crypto"] external createHash: string => Hash.t = "createHash";
7978

8079
module Hmac = {
81-
type kind = [ Stream.transform | `Hmac];
82-
type subtype('w, 'r, 'a) =
83-
Stream.Transform.subtype('w, 'r, [> kind] as 'a);
84-
type supertype('w, 'r, 'a) = Stream.subtype('w, 'r, [< kind] as 'a);
85-
type t = subtype(Buffer.t, Buffer.t, kind);
80+
type kind('w, 'r) = [ Stream.transform('w, 'r) | `Hmac];
81+
type subtype('w, 'r, 'a) = Stream.subtype([> kind('w, 'r)] as 'a);
82+
type supertype('w, 'r, 'a) = Stream.subtype([< kind('w, 'r)] as 'a);
83+
type t = subtype(Buffer.t, Buffer.t, kind('w, 'r));
8684
module Impl = {
8785
include Stream.Transform.Impl;
8886
[@bs.send] external digest: t => Buffer.t = "digest";
@@ -105,11 +103,10 @@ module Certificate = {
105103
};
106104

107105
module Cipher = {
108-
type kind = [ Stream.transform | `Cipher];
109-
type subtype('w, 'r, 'a) =
110-
Stream.Transform.subtype('w, 'r, [> kind] as 'a);
111-
type supertype('w, 'r, 'a) = Stream.subtype('w, 'r, [< kind] as 'a);
112-
type t = subtype(Buffer.t, Buffer.t, kind);
106+
type kind('w, 'r) = [ Stream.transform('w, 'r) | `Cipher];
107+
type subtype('w, 'r, 'a) = Stream.subtype([> kind('w, 'r)] as 'a);
108+
type supertype('w, 'r, 'a) = Stream.subtype([< kind('w, 'r)] as 'a);
109+
type t = subtype(Buffer.t, Buffer.t, kind('w, 'r));
113110
module Impl = {
114111
include Stream.Transform.Impl;
115112
[@bs.send] external final: (t, string) => Buffer.t = "final";
@@ -150,11 +147,10 @@ module Cipher = {
150147
};
151148

152149
module Decipher = {
153-
type kind = [ Stream.transform | `Decipher];
154-
type subtype('w, 'r, 'a) =
155-
Stream.Transform.subtype('w, 'r, [> kind] as 'a);
156-
type supertype('w, 'r, 'a) = Stream.subtype('w, 'r, [< kind] as 'a);
157-
type t = subtype(Buffer.t, Buffer.t, kind);
150+
type kind('w, 'r) = [ Stream.transform('w, 'r) | `Decipher];
151+
type subtype('w, 'r, 'a) = Stream.subtype([> kind('w, 'r)] as 'a);
152+
type supertype('w, 'r, 'a) = Stream.subtype([< kind('w, 'r)] as 'a);
153+
type t = subtype(Buffer.t, Buffer.t, kind('w, 'r));
158154
module Impl = {
159155
[@bs.send]
160156
external final: (subtype('w, 'r, 'a), string) => Buffer.t = "final";

src/Crypto__.re

Lines changed: 0 additions & 212 deletions
This file was deleted.

0 commit comments

Comments
 (0)