[m-rev.] Change compiler output to use `.' as module separator
Fergus Henderson
fjh at cs.mu.OZ.AU
Thu Dec 19 13:04:34 AEDT 2002
On 19-Dec-2002, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> Index: library/term_io.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/library/term_io.m,v
> retrieving revision 1.65
> diff -u -r1.65 term_io.m
> --- library/term_io.m 30 May 2002 04:39:48 -0000 1.65
> +++ library/term_io.m 5 Dec 2002 05:22:10 -0000
> @@ -346,6 +346,14 @@
> VarSet0, N0, VarSet1, N1),
> ( { OpName = "," } ->
> io__write_string(", ")
> + ; { OpName = "." } ->
> + % If the operator is '.'/2 then we must
> + % not put spaces around it (or at the
> + % very least, we should not put spaces
> + % afterwards, since otherwise it will
> + % not be seen as an operator by the parser.)
> + %
> + io__write_string(".")
I think that will do the wrong thing for terms such as '.'(1,2).
Note that term_io is used for parsing Prolog code, not just Mercury code...
p.ps.
> +++ compiler/code_gen.m 3 Dec 2002 06:43:35 -0000
> @@ -1352,7 +1352,7 @@
> string__int_to_string(Arity, ArityStr),
> proc_id_to_int(ProcId, ProcNum),
> string__int_to_string(ProcNum, ProcNumStr),
> - string__append_list([PredOrFuncString, " ", ModuleNameString, ":",
> + string__append_list([PredOrFuncString, " ", ModuleNameString, ".",
> FullPredName, "/", ArityStr, "-", ProcNumStr], PushMsg).
I think that will do the wrong thing if ModuleNameString and/or
FullPredName happen to be numeric. Probably that case is not worth
worrying about, but I guess we should dcument this issue.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list