File tree 3 files changed +8
-7
lines changed
3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ Notable changes to this project are documented in this file. The format is based
6
6
7
7
Breaking changes:
8
8
- Update project and deps to PureScript v0.15.0 (#39 by @nwolverson , @JordanMartinez , @sigma-andex )
9
+ - Update ` write ` callback to include ` Error ` arg (#40 by @JordanMartinez )
9
10
10
11
New features:
11
12
Original file line number Diff line number Diff line change @@ -254,15 +254,15 @@ foreign import write
254
254
:: forall r
255
255
. Writable r
256
256
-> Buffer
257
- -> Effect Unit
257
+ -> ( Error -> Effect Unit )
258
258
-> Effect Boolean
259
259
260
260
foreign import writeStringImpl
261
261
:: forall r
262
262
. Writable r
263
263
-> String
264
264
-> String
265
- -> Effect Unit
265
+ -> ( Error -> Effect Unit )
266
266
-> Effect Boolean
267
267
268
268
-- | Write a string in the specified encoding to a writable stream.
@@ -271,7 +271,7 @@ writeString
271
271
. Writable r
272
272
-> Encoding
273
273
-> String
274
- -> Effect Unit
274
+ -> ( Error -> Effect Unit )
275
275
-> Effect Boolean
276
276
writeString w enc = writeStringImpl w (show enc)
277
277
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ testReads = do
62
62
assertEqual (unsafePartial (fromJust str)) testString
63
63
pure unit
64
64
65
- writeString sIn UTF8 testString do
65
+ writeString sIn UTF8 testString \_ -> do
66
66
pure unit
67
67
68
68
testReadBuf = do
@@ -77,7 +77,7 @@ testReads = do
77
77
<*> pure testString
78
78
pure unit
79
79
80
- writeString sIn UTF8 testString do
80
+ writeString sIn UTF8 testString \_ -> do
81
81
pure unit
82
82
83
83
testSetDefaultEncoding :: Effect Boolean
@@ -91,7 +91,7 @@ testSetDefaultEncoding = do
91
91
92
92
where
93
93
check w = do
94
- writeString w UTF8 testString do
94
+ writeString w UTF8 testString \_ -> do
95
95
c <- getContentsAsString w
96
96
assertEqual testString c
97
97
@@ -128,7 +128,7 @@ testPipe = do
128
128
log " pipe 3"
129
129
_ <- unzip `pipe` sOut
130
130
131
- writeString sIn UTF8 testString do
131
+ writeString sIn UTF8 testString \_ -> do
132
132
end sIn do
133
133
onDataString sOut UTF8 \str -> do
134
134
assertEqual str testString
You can’t perform that action at this time.
0 commit comments