mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 09:53:36 +00:00
Estimated hours taken: 2
Branches: main
Start integrating the new stream typeclasses into the rest of the
standard library.
library/io.m:
Make the standard text and binary files streams from the io
modules instances of the new stream typeclasses.
(Note: I've only made instances of the obvious types, we
will probably want to define a few more, e.g.
:- type line ---> line(string)
).
Unrelated change: move the implementation of the function
version of io.error_message next to its predicate version.
library/pprint.m:
Generalise pprint.write so that it can write docs to any
arbitrary string writer.
tests/hard_coded/Mmakefile:
tests/hard_coded/stream_tests.{m,exp,data}:
A short test of the new stream typeclasses.
17 lines
370 B
Plaintext
17 lines
370 B
Plaintext
561
|
|
Hello World!
|
|
a
|
|
[foo, bar, baz]
|
|
[
|
|
foo,
|
|
foo,
|
|
foo,
|
|
foo,
|
|
foo,
|
|
foo,
|
|
foo,
|
|
foo,
|
|
foo,
|
|
foo]
|
|
['\n', '+', '_', ')', '(', '*', '&', '^', '%', '$', '#', '@', '!', '~', '\n', '9', '8', '7', '6', '5', '4', '3', '2', '1', '0', '\n', 'z', 'y', 'x', 'w', 'v', 'u', 't', 's', 'r', 'q', 'p', 'o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a']
|