add set_input/1, set_output/1

This commit is contained in:
Mark Thom
2020-03-15 23:29:21 -06:00
parent 8e318f76a7
commit f9c4a40d60
5 changed files with 166 additions and 39 deletions

View File

@@ -1315,12 +1315,9 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> {
self.print_atom(alias);
} else {
if stream.is_stdout() || stream.is_stdin() {
self.append_str("user");
self.print_atom(&clause_name!("user"));
} else {
self.append_str(&format!(
"'$stream'(0x{:x})",
stream.as_ptr() as usize,
));
self.format_struct(iter, max_depth, 1, clause_name!("$stream"));
}
}
}