[m-rev.] trivial diff: fix compilation of extras/error
Julien Fischer
juliensf at csse.unimelb.edu.au
Thu May 10 00:08:53 AEST 2007
Estimated hours taken: 0.1
Branches: main
Fix compilation of extras/error.
extras/error/error.m:
Rename the type error.line/0 to error.line_number/0 since the former
now conflicts with the recently added standard library type
string.line/0.
Julien.
Index: error.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/extras/error/error.m,v
retrieving revision 1.3
diff -u -r1.3 error.m
--- error.m 28 Jul 2006 05:10:34 -0000 1.3
+++ error.m 9 May 2007 14:05:03 -0000
@@ -69,11 +69,11 @@
:- import_module bool, char, int, list, map, maybe, pair, string.
-:- type errors == map(file, map(line, list(message))).
+:- type errors == map(file, map(line_number, list(message))).
:- type file == string.
-:- type line == int.
+:- type line_number == int.
:- type message == string.
@@ -155,7 +155,7 @@
read_errors(Errors1, MErrors)
).
-:- pred insert_error(errors, file, line, message, errors).
+:- pred insert_error(errors, file, line_number, message, errors).
:- mode insert_error(in, in, in, in, out) is det.
insert_error(Errs0, File, Line, Message, Errs) :-
@@ -171,7 +171,7 @@
),
set(Errs0, File, FileErrs, Errs).
-:- pred parse_error(list(char), file, line, message).
+:- pred parse_error(list(char), file, line_number, message).
:- mode parse_error(in, out, out, out) is semidet.
parse_error(Chars, File, Line, Message) :-
@@ -198,7 +198,7 @@
{ map__to_assoc_list(Errors, FileErrorList) },
process_2(FileErrorList).
-:- pred process_2(list(pair(file, map(line, list(message)))),
+:- pred process_2(list(pair(file, map(line_number, list(message)))),
io__state, io__state).
:- mode process_2(in, di, uo) is det.
@@ -243,7 +243,8 @@
),
process_2(Rest).
-:- pred merge_file(list(pair(line, list(message))), int, io__state, io__state).
+:- pred merge_file(list(pair(line_number, list(message))), int,
+ io__state, io__state).
:- mode merge_file(in, in, di, uo) is det.
merge_file([], _) -->
@@ -293,7 +294,7 @@
copy_rest
).
-:- pred error_rest(list(pair(line, list(message))), io__state, io__state).
+:- pred error_rest(list(pair(line_number, list(message))), io__state, io__state).
:- mode error_rest(in, di, uo) is det.
error_rest([]) --> [].
--------------------------------------------------------------------------
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