HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulestreamly-core-0.2.2Haskell2010

Streamly.Internal.Console.Stdio

  • 15 values

Streams

3 declarations
valueread :: MonadIO m => Stream m Word8
#

Read a byte stream from standard input.

read = Handle.read stdin
read = Stream.unfold Stdio.reader ()

Pre-release

valuereadChars :: MonadIO m => Stream m Char
#

Read a character stream from Utf8 encoded standard input.

readChars = Unicode.decodeUtf8 Stdio.read

Pre-release

valuereadChunks :: MonadIO m => Stream m (Array Word8)
#

Read a stream of chunks from standard input. The maximum size of a single chunk is limited to defaultChunkSize. The actual size read may be less than defaultChunkSize.

readChunks = Handle.readChunks stdin
readChunks = Stream.unfold Stdio.chunkReader ()

Pre-release

Unfolds

2 declarations

Folds

4 declarations

Stream writes

6 declarations
valueputBytes :: MonadIO m => Stream m Word8 -> m ()
#

Write a stream of bytes to standard output.

putBytes = Handle.putBytes stdout
putBytes = Stream.fold Stdio.write

Pre-release

valueputChars :: MonadIO m => Stream m Char -> m ()
#

Encode a character stream to Utf8 and write it to standard output.

putChars = Stdio.putBytes . Unicode.encodeUtf8

Pre-release

valueputChunks :: MonadIO m => Stream m (Array Word8) -> m ()
#

Write a stream of chunks to standard output.

putChunks = Handle.putChunks stdout
putChunks = Stream.fold Stdio.writeChunks

Pre-release

valueputStrings :: MonadIO m => Stream m String -> m ()
#

Write a stream of strings to standard output using UTF8 encoding. Output is flushed to the device for each string.

Pre-release