[m-users.] Version confusion locationg term_io.rea_term

Julien Fischer jfischer at opturion.com
Wed Aug 21 23:16:35 AEST 2024


Hi,

On Wed, 21 Aug 2024 at 23:06, Sean Charles (emacstheviking)
<objitsu at gmail.com> wrote:
>
> I was using
>
> export PATH=$PATH:/usr/local/mercury-rotd-2024-06-28/bin
> export MANPATH=$MANPATH:$PATH:/usr/local/mercury-rotd-2024-06-28/share/man
> export INFOPATH=$INFOPATH:/usr/local/mercury-rotd-2024-06-28/share/info
>
> and started playing with the `expand_terms.m` but after getting errors, it seems that the term_io module does not have that predicate.

What predicate?

> I then switched back to
>
> export PATH=$PATH:/usr/local/mercury-22.01.8/bin
> export MANPATH=$MANPATH:$PATH:/usr/local/mercury-22.01.8/share/man
> export INFOPATH=$INFOPATH:/usr/local/mercury-22.01.8/share/info
>
> whoch seems to have said predicate, however I then get these errors:
>
> Making Mercury/ints/dstack.int
> dstack.m:316: Syntax error at token ':-': operator precedence error.
> dstack.m:1663: Error: `format_call' is not a recognized pragma name.
> dstack.m:1672: Error: `format_call' is not a recognized pragma name.
> dstack.m:1683: Error: `format_call' is not a recognized pragma name.

The format_call pragma does not exist in mercury 22.01, which is what
you seem to be using there.

> lines 51-53 of srcdist-22.01.8/term_io.m
> :- pred read_term(read_term(T)::out, io::di, io::uo) is det.
> :- pred read_term(io.text_input_stream::in, read_term(T)::out,
> io::di, io::uo) is det.
>
> in term_io.m of srcdist-rotd-2024-06-28, there is no read_term/3 at all.
>
> So is there a version that has the format_call predicate and term_io.read_term or not? I am a bit confused atm!!

The very first entry in the post 22.01 NEWS file says:

* The predicates `read_term/3`, `read_term/4`, `read_term_with_op_table/4`,
  `read_term_with_op_table/5` have been removed from the `term_io` module
  of the Mercury standard library.

The replacements are in the library module mercury_term_parser.

Julien.


More information about the users mailing list