mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 09:23:44 +00:00
Estimated hours taken: 2
Branches: main
Add some new utility predicates for use with streams.
library/stream.m:
Add the predicate stream.format/5, an analogue of io.format,
that writes formatted output using an arbitrary string writer.
Add a predicate stream.ignore_whitespace/4 that can be used
to skip past whitespace in a putback char reader stream.
library/Mercury.options:
Don't warn about unknown format calls in the stream module.
Unrelated change: remove a workaround that was put in place
before the addition of the `--no-warn-obsolete' option.
compiler/format_call.m:
Also analyse calls to stream.format/5.
tests/hard_coded/Mmakefile:
tests/hard_coded/stream_format.{m,exp}:
tests/hard_coded/stream_ignore_ws.{m,exp,data}:
Test stream.format/5 and stream.ignore_whitespace/3.
tests/invalid/string_format_bad.{m,exp}:
tests/invalid/string_format_unknown.{m,exp}:
Check that we emit messages for bad/unknown calls to stream.format/5.
2 lines
12 B
Plaintext
2 lines
12 B
Plaintext
foo bar baz
|