Files
mercury/tests/debugger/interpreter.exp
Simon Taylor 5544aed7ff Change the list constructor from ./2' to [|]/2'. `./2' will
Estimated hours taken: 3
Branches: main

Change the list constructor from `./2' to `[|]/2'. `./2' will
eventually become the module qualification operator.

library/parser.m:
library/io.m:
library/sparse_bitset.m:
library/std_util.m:
library/term_io.m:
compiler/mercury_to_mercury.m:
compiler/prog_io_dcg.m:
compiler/prog_io_goal.m:
compiler/prog_io_pragma.m:
compiler/prog_io_typeclass.m:
compiler/prog_io_util.m:
browser/interactive_query.m:
extras/moose/grammar.m:
extras/moose/moose.m:
extras/morphine/source/generate_call_site_cov.m:
extras/xml/xml.encoding.m:
samples/muz/higher_order.m:
tests/debugger/declarative/app.m:
tests/dppd/transpose_impl.m:
tests/hard_coded/ground_dd.m:
tests/hard_coded/split_c_files.m:
	Change all references to `./2' to use `[|]/2' instead.

compiler/typecheck.m:
	Handle `./2' as a special case in `report_error_undef_cons'.

	Warn about module list not being imported if `[|]/2' is undefined.

compiler/llds_out.m:
util/mdemangle.c:
profiler/demangle.m:
	Add name conversions for `[|]' (f_cons) and `[]' (f_nil).

NEWS:
doc/reference_manual.texi:
w3/tutorial/lists-n-things.m4:
	Document the changes.

tests/debugger/{,declarative}/*.exp*:
	Update test case results. For some tests the output changed
	because they output lists in the non-pretty format. For others,
	the output changed because the alphabetical ordering of the
	constructors of type `list/1' changed, so the numbering of
	the switch branches in the goal paths changed.
2001-09-25 09:37:12 +00:00

43 lines
2.2 KiB
Plaintext

1: 1 1 CALL pred interpreter:main/2-0 (det) interpreter.m:34
mdb> echo on
Command echo enabled.
mdb> context none
Contexts will not be printed.
mdb> register --quiet
mdb> 10 step
Pure Prolog Interpreter.
Consulting file `interpreter.m'...
11: 6 5 SWTC pred interpreter:consult_until_eof_2/5-0 (det) s3;
mdb> vars
1 HeadVar__1
2 HeadVar__2
3 HeadVar__4
mdb> print *
HeadVar__1 term(varset(var_supply(0), empty, empty), functor(atom(":-"), [|](functor/3, []), context("interpreter.m", 22)))
HeadVar__2 []
HeadVar__4 state('<<c_pointer>>')
mdb> goto 30
30: 16 12 CALL pred interpreter:database_assert_clause/4-0 (det)
mdb> print *
HeadVar__1 [|](clause(varset(var_supply/1, empty, empty), functor(atom/1, [|]/2, context/2), functor(atom/1, [], context/2)), [|](clause(varset/3, functor/3, functor/3), [|](clause/3, [])))
HeadVar__2 varset(var_supply(0), empty, empty)
HeadVar__3 functor(atom(":-"), [|](functor(atom/1, [|]/2, context/2), []), context("interpreter.m", 26))
mdb> finish -a
31: 16 12 ELSE pred interpreter:database_assert_clause/4-0 (det) e;
32: 16 12 EXIT pred interpreter:database_assert_clause/4-0 (det)
mdb> print *
HeadVar__1 [|](clause(varset(var_supply/1, empty, empty), functor(atom/1, [|]/2, context/2), functor(atom/1, [], context/2)), [|](clause(varset/3, functor/3, functor/3), [|](clause/3, [])))
HeadVar__2 varset(var_supply(0), empty, empty)
HeadVar__3 functor(atom(":-"), [|](functor(atom/1, [|]/2, context/2), []), context("interpreter.m", 26))
HeadVar__4 [|](clause(varset(var_supply/1, empty, empty), functor(atom/1, [|]/2, context/2), functor(atom/1, [], context/2)), [|](clause(varset/3, functor/3, functor/3), [|](clause/3, [|]/2)))
mdb>
33: 17 12 CALL pred interpreter:consult_until_eof/4-0 (det)
mdb> finish -n
677: 17 12 EXIT pred interpreter:consult_until_eof/4-0 (det)
mdb>
678: 15 11 EXIT pred interpreter:consult_until_eof_2/5-0 (det)
mdb>
679: 14 10 EXIT pred interpreter:consult_until_eof/4-0 (det)
mdb> continue
?-