read

The read function reads input from a string, which must be completely consumed by the input process. read fails with an error if the parse is unsuccessful, and it is therefore discouraged from being used in real applications. Use readMaybe or readEither for safe alternatives.
>>> read "123" :: Int
123
>>> read "hello" :: Int
*** Exception: Prelude.read: no parse
Read up to the specified number of bytes starting from a specified offset, returning the number of bytes actually read. This function should only block if there is no data available. If there is not enough data available, then the function should just return the available data. A return value of zero indicates that the end of the data stream (e.g. end of file) has been reached.
Yield the element at the given position.
Yield the element at the given position.
Yield the element at the given position.
Yield the element at the given position.
Yield the element at the given position.
Parse Readable values, only forwarding the value if the parse succeeds
Reads one value from an InputStream. Returns either a value wrapped in a Just, or Nothing if the end of the stream is reached.
Make a stream of strings into a stream of parsed values, skipping bad cases
>>> S.sum_ $ S.read $ S.takeWhile (/= "total") S.stdinLn :: IO Int
1000<Enter>
2000<Enter>
total<Enter>
3000
Convert a data stream in the tar file format into an internal data structure. Decoding errors are reported by the Fail constructor of the Entries type.
  • The conversion is done lazily.
Try to read the given number of bytes from an SSL connection. On EOF an empty ByteString is returned. If the connection dies without a graceful SSL shutdown, an exception is raised.
Get the current value of the counter.
Get the current statistical summary for the event being tracked.
Get the current value of the gauge.
Get the current value of the label.
Parse Text to a value
Control.Monad.ST.runST (do arr <- new_ 10; Monad.zipWithM_ (write arr) [9,8..0] ['a'..]; read arr 3)
Unfold standard input into a stream of Word8.
Unfold an array into a stream. Since 0.7.0 (Streamly.Memory.Array)
Unfolds a file handle into a byte stream. IO requests to the device are performed in sizes of defaultChunkSize.
Unfold an array into a stream.
Unfold an array into a stream.