Files
mercury/tests/debugger/higher_order.exp2
Ralph Becket a8ffd3680c Change the compiler and tools so that .' and not :' is now used as the
Estimated hours taken: 14
Branches: main

Change the compiler and tools so that `.' and not `:' is now used as the
module separator in all output.

Infix `.' now has associativity yfx and priority 10.

NEWS:
	Report the change.

configure.in:
	Amend the test for an up-to-date Mercury compiler to check whether
	it recognises `.' as a module qualifier.

compiler/code_gen.m:
compiler/error_util.m:
compiler/hlds_out.m:
compiler/prog_out.m:
compiler/prog_util.m:
compiler/rl_exprn.m:
compiler/rl_gen.m:
compiler/source_file_map.m:
compiler/unused_args.m:
library/io.m:
library/rtti_implementation.m:
library/type_desc.m:
runtime/mercury_debug.c:
runtime/mercury_deconstruct.c:
runtime/mercury_stack_trace.c:
	Change `:' to `.' as module separator for output.

compiler/mercury_to_mercury.m:
compiler/prog_io_typeclass.m:
	As above.
	Fixed a bug where `.' was not being recognised as a module separator.

doc/reference_manual.texi:
	Report the change.

library/term_io.m:
	Ensure that infix `.' is written without surrounding spaces.

tests/hard_coded/dot_separator.m:
tests/hard_coded/dot_separator.exp:
tests/hard_coded/Mmakefile:
	Test case added.
2003-01-17 05:57:20 +00:00

70 lines
3.5 KiB
Plaintext

1: 1 1 CALL pred higher_order.main/2-0 (det) higher_order.m:12
mdb> echo on
Command echo enabled.
mdb> context none
Contexts will not be printed.
mdb> set size 100
mdb> set depth 100
mdb> set format flat
mdb> step
2: 2 2 CALL pred higher_order.domap/3-0 (det)
mdb> print *
HeadVar__1 float_add2(3.00000000000000)
HeadVar__2 [|](1.00000000000000, [|](2.00000000000000, [|](3.00000000000000, [|](4.00000000000000, [|](5.00000000000000, [])))))
mdb> finish
29: 2 2 EXIT pred higher_order.domap/3-0 (det)
mdb> print *
HeadVar__1 float_add2(3.00000000000000)
HeadVar__2 [|](1.00000000000000, [|](2.00000000000000, [|](3.00000000000000, [|](4.00000000000000, [|](5.00000000000000, [])))))
HeadVar__3 [|](4.00000000000000, [|](5.00000000000000, [|](6.00000000000000, [|](7.00000000000000, [|](8.00000000000000, [])))))
mdb> step
30: 13 2 CALL pred higher_order.domap/3-0 (det)
mdb> print *
HeadVar__1 float_op3(4.00000000000000, 5.00000000000000)
HeadVar__2 [|](1.00000000000000, [|](2.00000000000000, [|](3.00000000000000, [|](4.00000000000000, [|](5.00000000000000, [])))))
mdb> finish
57: 13 2 EXIT pred higher_order.domap/3-0 (det)
mdb> print *
HeadVar__1 float_op3(4.00000000000000, 5.00000000000000)
HeadVar__2 [|](1.00000000000000, [|](2.00000000000000, [|](3.00000000000000, [|](4.00000000000000, [|](5.00000000000000, [])))))
HeadVar__3 [|](9.00000000000000, [|](14.0000000000000, [|](19.0000000000000, [|](24.0000000000000, [|](29.0000000000000, [])))))
mdb> step
58: 24 2 CALL pred higher_order.domap/3-0 (det)
mdb> print *
HeadVar__1 max(3)
HeadVar__2 [1, 2, 3, 4, 5]
mdb> finish
85: 24 2 EXIT pred higher_order.domap/3-0 (det)
mdb> print *
HeadVar__1 max(3)
HeadVar__2 [1, 2, 3, 4, 5]
HeadVar__3 [3, 3, 3, 4, 5]
mdb> step
86: 35 2 CALL pred higher_order.domap/3-0 (det)
mdb> print *
HeadVar__1 'IntroducedFrom__pred__main__21__1'([6])
HeadVar__2 [[1, 2], [3, 4, 5]]
mdb> finish
106: 35 2 EXIT pred higher_order.domap/3-0 (det)
mdb> print *
HeadVar__1 'IntroducedFrom__pred__main__21__1'([6])
HeadVar__2 [[1, 2], [3, 4, 5]]
HeadVar__3 [|]([|](6, [|](1, [|](2, []))), [|]([|](6, [|](3, [|](4, [|](5, [])))), []))
mdb> step
107: 44 2 CALL pred higher_order.domap/3-0 (det)
mdb> print *
HeadVar__1 'IntroducedFrom__pred__main__22__2'(["a"])
HeadVar__2 [|]([|]("one", [|]("two", [])), [|]([|]("three", [|]("four", [|]("five", []))), []))
mdb> finish
127: 44 2 EXIT pred higher_order.domap/3-0 (det)
mdb> print *
HeadVar__1 'IntroducedFrom__pred__main__22__2'(["a"])
HeadVar__2 [|]([|]("one", [|]("two", [])), [|]([|]("three", [|]("four", [|]("five", []))), []))
HeadVar__3 [|]([|]("a", [|]("one", [|]("two", []))), [|]([|]("a", [|]("three", [|]("four", [|]("five", [])))), []))
mdb> continue -S
[4.00000000000000, 5.00000000000000, 6.00000000000000, 7.00000000000000, 8.00000000000000]
[9.00000000000000, 14.0000000000000, 19.0000000000000, 24.0000000000000, 29.0000000000000]
[3, 3, 3, 4, 5]
[[6, 1, 2], [6, 3, 4, 5]]
[["a", "one", "two"], ["a", "three", "four", "five"]]