ReasonChip Streams

This module provides ReasonChips for handling standard input (stdin), standard output (stdout), and standard error (stderr) using bytes.

View source code here: GitHub

reasonchip.streams.read_stdin

Read up to max_bytes from stdin as bytes.

Request Parameters

FieldTypeDescription
max_bytesMaximum number of bytes to read from stdin.

Response

FieldTypeDescription
dataBytes read from stdin.

reasonchip.streams.write_stdout

Write bytes to stdout.

Request Parameters

FieldTypeDescription
dataBytes to write to stdout.

Response

FieldTypeDescription
successIndicates if writing to stdout was successful.

reasonchip.streams.write_stderr

Write bytes to stderr.

Request Parameters

FieldTypeDescription
dataBytes to write to stderr.

Response

FieldTypeDescription
successIndicates if writing to stderr was successful.

reasonchip.streams.print_stdout

Print a message to stdout.

Request Parameters

FieldTypeDescription
messageThe message to print to stdout.

Response

FieldTypeDescription
successIndicates if the print operation was successful.

reasonchip.streams.read_bytes

Read up to max_bytes from stdin as bytes.

Request Parameters

FieldTypeDescription
max_bytesMaximum number of bytes to read from stdin.

Response

FieldTypeDescription
dataBytes read from stdin.

reasonchip.streams.read_line

Read a single line from stdin as bytes.

Request Parameters

FieldTypeDescription
max_bytesMaximum number of bytes to read from stdin in a single line.

Response

FieldTypeDescription
dataA single line read from stdin as bytes.

© 2025 South Patron LLC. All rights reserved.

AI everywhere.