write_canonical and streams

Wouter Beek <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <CAE1un7O=BZvVpHmfjp9jpbwVn9hVGSB96Mv__0JYi_aWR5vKLw@mail.gmail.com>
Hi Prologgers,

The documentation for `write_canonical/[1,2]` states that "Terms
written with this predicate can always be read back [...]"

But for error terms that include a stream alias I get the following
when reading back:
~~~{.pl}
read_term_from_atom('error(io_error(read,<stream>(0x7ff649a6d830)),context(:(read_util,/(read_line_to_codes,2)),\'Connection
reset by peer\'))', Term, []).
ERROR: Syntax error: Operator expected
ERROR: error(io_error(read,<
ERROR: ** here **
ERROR: stream>(0x7ff649a6d830)),context(:(read_util,/(read_line_to_codes,2)),'Connection
reset by peer')) .
~~~

Does canonical writing not work for stream aliases or am I making some
other mistake?

---
Cheers!,
Wouter.

E-mail: [email protected]
WWW: www.wouterbeek.com
Tel.: 0647674624
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.