[m-rev.] diff: fix call to io:format in erlang main wrapper

Peter Wang wangp at students.csse.unimelb.edu.au
Fri Jun 8 17:27:58 AEST 2007


Estimated hours taken: 0.1
Branches: main

compiler/elds_to_erlang.m:
	Fix an incorrect call to io:format in the main wrapper generated for
	Erlang programs.

(Julien, this is the one I stuffed up)

Index: elds_to_erlang.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/elds_to_erlang.m,v
retrieving revision 1.13
diff -u -r1.13 elds_to_erlang.m
--- elds_to_erlang.m	8 Jun 2007 00:47:09 -0000	1.13
+++ elds_to_erlang.m	8 Jun 2007 07:23:53 -0000
@@ -306,7 +306,7 @@
             is_integer(ArityOrArgs) ->
                 io:format(""/~B~n"", [ArityOrArgs]);
             true ->
-                io:format(""~p~n"", ArityOrArgs)
+                io:format(""~p~n"", [ArityOrArgs])
         end,
         % Don't show stack frames below main.
         case St of
@@ -335,7 +335,7 @@
         PredProcIds = []
     ;
         PredProcIds = [_ | _],
-        nl_indent_line(1, !IO),
+        nl_indent_line(0, !IO),
         io.write_string(Name, !IO),
         io.write_string("() ->", !IO),
         list.foldl(output_init_fn_call(ModuleInfo), PredProcIds, !IO),
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list