[m-dev.] trivial diff: can't take address of string__length
Simon Taylor
stayl at cs.mu.OZ.AU
Tue Nov 14 09:46:34 AEDT 2000
Estimated hours taken: 0.1
browser/frame.m:
string__length now has multiple modes, so its address can't be taken.
Index: frame.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/frame.m,v
retrieving revision 1.3
diff -u -u -r1.3 frame.m
--- frame.m 2000/02/04 03:45:28 1.3
+++ frame.m 2000/11/13 22:43:44
@@ -97,7 +97,7 @@
:- pred frame_right_pad(frame, frame).
:- mode frame_right_pad(in, out) is det.
frame_right_pad(Frame, PaddedFrame) :-
- list__map(string__length, Frame, Lengths),
+ Lengths = list__map((func(Str) = string__length(Str)), Frame),
list__foldl(int__max, Lengths, 0, MaxLen),
list__map(subtract(MaxLen), Lengths, Paddings),
add_right_padding(Frame, Paddings, PaddedFrame).
@@ -134,7 +134,7 @@
% Horizontal size (width) of a frame
frame__hsize(Frame, HSize) :-
- list__map(string__length, Frame, Lengths),
+ Lengths = list__map(func(Str) = string__length(Str), Frame),
list__foldl(int__max, Lengths, 0, MaxLen),
HSize = MaxLen.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list