Skip to content

Commit 5c3c718

Browse files
committed
cosmetic style changes;
1 parent f44c244 commit 5c3c718

File tree

1 file changed

+102
-116
lines changed

1 file changed

+102
-116
lines changed

src/Http.re

Lines changed: 102 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,99 @@
11
type http = [ | `Http];
22

33
type headersObject = {
4-
accept: option(string),
5-
[@bs.as "accept-language"]
6-
acceptLanguage: option(string),
7-
[@bs.as "accept-patch"]
8-
acceptPatch: option(string),
9-
[@bs.as "accept-ranges"]
10-
acceptRanges: option(string),
11-
[@bs.as "access-control-allow-credentials"]
12-
accessControlAllowCredentials: option(string),
13-
[@bs.as "access-control-allow-headers"]
14-
accessControlAllowHeaders: option(string),
15-
[@bs.as "access-control-allow-methods"]
16-
accessControlAllowMethods: string,
17-
[@bs.as "access-control-allow-origin"]
18-
accessControlAllowOrigin: option(string),
19-
[@bs.as "access-control-expose-headers"]
20-
accessControlExposeHeaders: option(string),
21-
[@bs.as "access-control-max-age"]
22-
accessControlMaxAge: option(string),
23-
age: option(string),
24-
allow: option(string),
25-
[@bs.as "alt-svc"]
26-
altSvc: option(string),
27-
authorization: option(string),
28-
[@bs.as "cache-control"]
29-
cacheControl: option(string),
30-
connection: option(string),
31-
[@bs.as "content-disposition"]
32-
contentDisposition: option(string),
33-
[@bs.as "content-encoding"]
34-
contentEncoding: option(string),
35-
[@bs.as "content-language"]
36-
contentLanguage: option(string),
37-
[@bs.as "content-length"]
38-
contentLenth: option(string),
39-
[@bs.as "content-location"]
40-
contentLocation: option(string),
41-
[@bs.as "content-range"]
42-
contentRange: option(string),
43-
[@bs.as "content-type"]
44-
contentType: option(string),
45-
cookie: option(string),
46-
date: option(string),
47-
expect: option(string),
48-
expires: option(string),
49-
forwarded: option(string),
50-
from: option(string),
51-
host: option(string),
52-
[@bs.as "if-match"]
53-
ifMatch: option(string),
54-
[@bs.as "if-modified-since"]
55-
ifModifiedSince: option(string),
56-
[@bs.as "if-none-match"]
57-
ifNoneMatch: option(string),
58-
[@bs.as "if-unmodified-since"]
59-
ifUnmodifiedSince: option(string),
60-
[@bs.as "last-modified"]
61-
lastModified: option(string),
62-
location: option(string),
63-
pragma: option(string),
64-
[@bs.as "proxy-authenticate"]
65-
proxyAuthenticate: option(string),
66-
[@bs.as "proxy-authorization"]
67-
proxyAuthorization: option(string),
68-
[@bs.as "public-key-pins"]
69-
publicKeyPins: option(string),
70-
range: option(string),
71-
referer: option(string),
72-
[@bs.as "retry-after"]
73-
retryAfter: option(string),
74-
[@bs.as "set-cookie"]
75-
setCookie: option(array(string)),
76-
[@bs.as "strict-transport-security"]
77-
strictTransportPolicy: option(string),
78-
tk: option(string),
79-
trailer: option(string),
80-
[@bs.as "transfer-encoding"]
81-
transferEncoding: option(string),
82-
upgrade: option(string),
83-
[@bs.as "user-agent"]
84-
userAgent: option(string),
85-
vary: option(string),
86-
via: option(string),
87-
warning: option(string),
88-
[@bs.as "www-authenticate"]
89-
wwwAuthenticate: option(string),
90-
};
4+
accept: option(string),
5+
[@bs.as "accept-language"]
6+
acceptLanguage: option(string),
7+
[@bs.as "accept-patch"]
8+
acceptPatch: option(string),
9+
[@bs.as "accept-ranges"]
10+
acceptRanges: option(string),
11+
[@bs.as "access-control-allow-credentials"]
12+
accessControlAllowCredentials: option(string),
13+
[@bs.as "access-control-allow-headers"]
14+
accessControlAllowHeaders: option(string),
15+
[@bs.as "access-control-allow-methods"]
16+
accessControlAllowMethods: string,
17+
[@bs.as "access-control-allow-origin"]
18+
accessControlAllowOrigin: option(string),
19+
[@bs.as "access-control-expose-headers"]
20+
accessControlExposeHeaders: option(string),
21+
[@bs.as "access-control-max-age"]
22+
accessControlMaxAge: option(string),
23+
age: option(string),
24+
allow: option(string),
25+
[@bs.as "alt-svc"]
26+
altSvc: option(string),
27+
authorization: option(string),
28+
[@bs.as "cache-control"]
29+
cacheControl: option(string),
30+
connection: option(string),
31+
[@bs.as "content-disposition"]
32+
contentDisposition: option(string),
33+
[@bs.as "content-encoding"]
34+
contentEncoding: option(string),
35+
[@bs.as "content-language"]
36+
contentLanguage: option(string),
37+
[@bs.as "content-length"]
38+
contentLenth: option(string),
39+
[@bs.as "content-location"]
40+
contentLocation: option(string),
41+
[@bs.as "content-range"]
42+
contentRange: option(string),
43+
[@bs.as "content-type"]
44+
contentType: option(string),
45+
cookie: option(string),
46+
date: option(string),
47+
expect: option(string),
48+
expires: option(string),
49+
forwarded: option(string),
50+
from: option(string),
51+
host: option(string),
52+
[@bs.as "if-match"]
53+
ifMatch: option(string),
54+
[@bs.as "if-modified-since"]
55+
ifModifiedSince: option(string),
56+
[@bs.as "if-none-match"]
57+
ifNoneMatch: option(string),
58+
[@bs.as "if-unmodified-since"]
59+
ifUnmodifiedSince: option(string),
60+
[@bs.as "last-modified"]
61+
lastModified: option(string),
62+
location: option(string),
63+
pragma: option(string),
64+
[@bs.as "proxy-authenticate"]
65+
proxyAuthenticate: option(string),
66+
[@bs.as "proxy-authorization"]
67+
proxyAuthorization: option(string),
68+
[@bs.as "public-key-pins"]
69+
publicKeyPins: option(string),
70+
range: option(string),
71+
referer: option(string),
72+
[@bs.as "retry-after"]
73+
retryAfter: option(string),
74+
[@bs.as "set-cookie"]
75+
setCookie: option(array(string)),
76+
[@bs.as "strict-transport-security"]
77+
strictTransportPolicy: option(string),
78+
tk: option(string),
79+
trailer: option(string),
80+
[@bs.as "transfer-encoding"]
81+
transferEncoding: option(string),
82+
upgrade: option(string),
83+
[@bs.as "user-agent"]
84+
userAgent: option(string),
85+
vary: option(string),
86+
via: option(string),
87+
warning: option(string),
88+
[@bs.as "www-authenticate"]
89+
wwwAuthenticate: option(string),
90+
};
9191

9292
module IncomingMessage = {
9393
type kind('r) = [ Stream.readable('r) | `IncomingMessage];
9494
type subtype('r, 'a) = Stream.subtype([> kind('r)] as 'a);
9595
type supertype('r, 'a) = Stream.subtype([< kind('r)] as 'a);
96-
type t = Stream.subtype([ kind(Buffer.t)]);
96+
type t = Stream.subtype(kind(Buffer.t));
9797
module Events = {
9898
include Stream.Readable.Events;
9999
[@bs.send]
@@ -154,8 +154,7 @@ module IncomingMessage = {
154154
external setTimeoutWithCallback:
155155
(subtype('r, 'a), int, subtype('r, 'a) => unit) => subtype('r, 'a) =
156156
"setTimeout";
157-
[@bs.get]
158-
external socket: subtype('r, 'a) => Net.TcpSocket.t = "socket";
157+
[@bs.get] external socket: subtype('r, 'a) => Net.TcpSocket.t = "socket";
159158
[@bs.get] external statusCode: subtype('r, 'a) => int = "statusCode";
160159
[@bs.get]
161160
external statusMessage: subtype('r, 'a) => string = "statusMessage";
@@ -169,7 +168,7 @@ module ClientRequest = {
169168
type kind('w, 'r) = [ Stream.duplex('w, 'r) | `ClientRequest];
170169
type subtype('w, 'r, 'a) = Stream.subtype([> kind('w, 'r)] as 'a);
171170
type supertype('w, 'r, 'a) = Stream.subtype([< kind('w, 'r)] as 'a);
172-
type t = Stream.subtype([ kind(Buffer.t, Buffer.t)]);
171+
type t = Stream.subtype(kind(Buffer.t, Buffer.t));
173172
type information = {
174173
httpVersion: string,
175174
httpVersionMajor: int,
@@ -249,9 +248,7 @@ module ClientRequest = {
249248
(
250249
subtype('w, 'r, 'a),
251250
[@bs.as "upgrade"] _,
252-
[@bs.uncurry] (
253-
(IncomingMessage.t, Net.TcpSocket.t, Buffer.t) => unit
254-
)
251+
[@bs.uncurry] ((IncomingMessage.t, Net.TcpSocket.t, Buffer.t) => unit)
255252
) =>
256253
subtype('w, 'r, 'a) =
257254
"on";
@@ -324,9 +321,7 @@ module ClientRequest = {
324321
(
325322
subtype('w, 'r, 'a),
326323
[@bs.as "upgrade"] _,
327-
[@bs.uncurry] (
328-
(IncomingMessage.t, Net.TcpSocket.t, Buffer.t) => unit
329-
)
324+
[@bs.uncurry] ((IncomingMessage.t, Net.TcpSocket.t, Buffer.t) => unit)
330325
) =>
331326
subtype('w, 'r, 'a) =
332327
"off";
@@ -345,8 +340,7 @@ module ClientRequest = {
345340
(
346341
subtype('w, 'r, 'a),
347342
[@bs.as "connect"] _,
348-
(IncomingMessage.t, Net.Socket.subtype('w, 'r, 'c), Buffer.t) =>
349-
unit
343+
(IncomingMessage.t, Net.Socket.subtype('w, 'r, 'c), Buffer.t) => unit
350344
) =>
351345
unit =
352346
"once";
@@ -400,9 +394,7 @@ module ClientRequest = {
400394
(
401395
subtype('w, 'r, 'a),
402396
[@bs.as "upgrade"] _,
403-
[@bs.uncurry] (
404-
(IncomingMessage.t, Net.TcpSocket.t, Buffer.t) => unit
405-
)
397+
[@bs.uncurry] ((IncomingMessage.t, Net.TcpSocket.t, Buffer.t) => unit)
406398
) =>
407399
subtype('w, 'r, 'a) =
408400
"once";
@@ -472,7 +464,7 @@ module ServerResponse = {
472464
type kind('w, 'r) = [ Stream.duplex('w, 'r) | `ServerResponse];
473465
type subtype('w, 'r, 'a) = Stream.subtype([> kind('w, 'r)] as 'a);
474466
type supertype('w, 'r, 'a) = Stream.subtype([< kind('w, 'r)] as 'a);
475-
type t = Stream.subtype([ kind(Buffer.t, Buffer.t)]);
467+
type t = Stream.subtype(kind(Buffer.t, Buffer.t));
476468
module Events = {
477469
include Stream.Duplex.Events;
478470
[@bs.send]
@@ -675,8 +667,7 @@ module Server = {
675667
subtype('a),
676668
[@bs.as "connect"] _,
677669
[@bs.uncurry] (
678-
(IncomingMessage.t, Net.TcpSocket.t, Js.nullable(Buffer.t)) =>
679-
unit
670+
(IncomingMessage.t, Net.TcpSocket.t, Js.nullable(Buffer.t)) => unit
680671
)
681672
) =>
682673
subtype('a) =
@@ -696,8 +687,7 @@ module Server = {
696687
subtype('a),
697688
[@bs.as "upgrade"] _,
698689
[@bs.uncurry] (
699-
(IncomingMessage.t, Net.TcpSocket.t, Js.nullable(Buffer.t)) =>
700-
unit
690+
(IncomingMessage.t, Net.TcpSocket.t, Js.nullable(Buffer.t)) => unit
701691
)
702692
) =>
703693
subtype('a) =
@@ -744,8 +734,7 @@ module Server = {
744734
subtype('a),
745735
[@bs.as "connect"] _,
746736
[@bs.uncurry] (
747-
(IncomingMessage.t, Net.TcpSocket.t, Js.nullable(Buffer.t)) =>
748-
unit
737+
(IncomingMessage.t, Net.TcpSocket.t, Js.nullable(Buffer.t)) => unit
749738
)
750739
) =>
751740
subtype('a) =
@@ -765,8 +754,7 @@ module Server = {
765754
subtype('a),
766755
[@bs.as "upgrade"] _,
767756
[@bs.uncurry] (
768-
(IncomingMessage.t, Net.TcpSocket.t, Js.nullable(Buffer.t)) =>
769-
unit
757+
(IncomingMessage.t, Net.TcpSocket.t, Js.nullable(Buffer.t)) => unit
770758
)
771759
) =>
772760
subtype('a) =
@@ -813,8 +801,7 @@ module Server = {
813801
subtype('a),
814802
[@bs.as "connect"] _,
815803
[@bs.uncurry] (
816-
(IncomingMessage.t, Net.TcpSocket.t, Js.nullable(Buffer.t)) =>
817-
unit
804+
(IncomingMessage.t, Net.TcpSocket.t, Js.nullable(Buffer.t)) => unit
818805
)
819806
) =>
820807
subtype('a) =
@@ -834,8 +821,7 @@ module Server = {
834821
subtype('a),
835822
[@bs.as "upgrade"] _,
836823
[@bs.uncurry] (
837-
(IncomingMessage.t, Net.TcpSocket.t, Js.nullable(Buffer.t)) =>
838-
unit
824+
(IncomingMessage.t, Net.TcpSocket.t, Js.nullable(Buffer.t)) => unit
839825
)
840826
) =>
841827
subtype('a) =
@@ -854,7 +840,7 @@ module Server = {
854840
include Events;
855841
[@bs.send]
856842
external setTimeout:
857-
(subtype('a), int, [@bs.uncurry] (Net.TcpSocket.t => unit)) => unit =
843+
(subtype('a), int, [@bs.uncurry] (Net.Socket.t => unit)) => unit =
858844
"setTimeout";
859845
[@bs.get] external timeout: subtype('a) => int = "timeout";
860846
[@bs.send]

0 commit comments

Comments
 (0)