HigherOrderCO/Bend

Update print/input functions for new file IO primitives

developedby opened this issue · 1 comments

File IO functions are added in #573.

We need to update print and input functions to use the new primitive file io functions.

HVM assigns fd 0 to stdin, 1 to stdout and 2 to stderr. We need to write to those files.

I think we should also add an eprint to print to stderr, maybe println and eprintln variants.

Print should receive a string and encode it as utf8.
Input should read a string from stdin and decode it as utf8.

Possibly add a getc or similar for reading single characters.

Closed by #599