HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Modulestreamly-core-0.3.1Haskell2010

Streamly.Internal.Console.Stdio

  • 15 values

Singleton APIs

0 declarations

Stream reads

2 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

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

UTF-8 decoded

valuereadChars :: MonadIO m => Stream m Char
#

Read a character stream from Utf8 encoded standard input.

readChars = Unicode.decodeUtf8 Stdio.read

Pre-release

Unfolds

2 declarations

Folds

4 declarations

Stream writes

2 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

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

Encoding specific

UTF-8 encoded

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

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