Skip to content
This repository was archived by the owner on Aug 4, 2023. It is now read-only.

Commit bca84f0

Browse files
committed
Docs
1 parent 3696685 commit bca84f0

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/Node/Stream/Aff.purs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
-- | Open process streams with
77
-- | [__Node.Process__](https://pursuit.purescript.org/packages/purescript-node-process/docs/Node.Process).
88
-- |
9+
-- | Read and write strings with the __toString__ and __fromString__ functions in
10+
-- | [__Node.Buffer__](https://pursuit.purescript.org/packages/purescript-node-buffer/docs/Node.Buffer#t:MutableBuffer).
11+
-- |
912
-- | All I/O errors will be thrown through the `Aff` `MonadError` class
1013
-- | instance.
1114
-- |
@@ -21,7 +24,7 @@
2124
-- | [`readable.read([size])`](https://nodejs.org/docs/latest/api/stream.html#readablereadsize)
2225
-- | function and are subject to the caveats of that function.
2326
-- |
24-
-- | #### Results
27+
-- | #### Result Buffers
2528
-- |
2629
-- | The result of a reading function may be chunked into more than one `Buffer`.
2730
-- | The `fst` element of the result `Tuple` is an `Array Buffer` of what
@@ -42,11 +45,17 @@
4245
-- | <- liftEffect $ Array.foldM (\a b -> (a+_) <$> size b) 0 inputs
4346
-- | ```
4447
-- |
48+
-- | #### Result `readagain` flag
49+
-- |
4550
-- | The `snd` element of the result `Tuple` is a `Boolean` flag which
4651
-- | is `true` if the stream has not reached End-Of-File (and also if the stream
47-
-- | has not errored or been destroyed.) If the flag is `false` then
52+
-- | has not errored or been destroyed), so we know we can read again.
53+
-- | If the flag is `false` then
4854
-- | no more bytes will ever be produced by the stream.
4955
-- |
56+
-- | Reading from an ended, closed, errored, or destroyed stream
57+
-- | will complete immediately with `Tuple [] false`.
58+
-- |
5059
-- | #### Canceller argument
5160
-- |
5261
-- | The reading functions suffixed with underscore take a canceller argument.

0 commit comments

Comments
 (0)