for review: lambda.m bug fix
Simon Taylor
stayl at cs.mu.OZ.AU
Tue Sep 1 13:57:12 AEST 1998
Estimated hours taken: 0.5
compiler/lambda.m:
Fix a bug reported by Tom in the computation of the modes
of introduced predicates.
tests/valid/lambda_output.m:
Test case.
Index: lambda.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/lambda.m,v
retrieving revision 1.44
diff -u -t -u -r1.44 lambda.m
--- lambda.m 1998/07/08 20:56:33 1.44
+++ lambda.m 1998/08/12 03:30:32
@@ -411,7 +413,7 @@
map__from_corresponding_lists(OrigVars, OrigArgModes,
OrigArgModesMap),
map__overlay(ArgModesMap, OrigArgModesMap, ArgModesMap1),
- map__values(ArgModesMap1, ArgModes1),
+ map__apply_to_list(ArgVars, ArgModesMap1, ArgModes1),
% Recompute the uni_modes.
mode_util__modes_to_uni_modes(ArgModes1, ArgModes1,
:- module lambda_output.
:- interface.
:- import_module io.
:- pred main(io__state::di, io__state::uo) is det.
:- implementation.
main -->
fork(a(_), b).
:- pred fork(pred(io__state, io__state), pred(io__state, io__state),
io__state, io__state).
:- mode fork(pred(di, uo) is det, pred(di, uo) is det,
di, uo) is det.
fork(A, B) -->
call(A), call(B).
:- pred a(int, io__state, io__state).
:- mode a(out, di, uo) is det.
a(42) --> [].
:- pred b(io__state, io__state).
:- mode b(di, uo) is det.
b --> [].
More information about the developers
mailing list