[m-rev.] diff: add cc_multi modes for map.foldl and map.foldr

Ian MacLarty maclarty at csse.unimelb.edu.au
Mon Feb 16 14:28:00 AEDT 2009


On Mon, Feb 16, 2009 at 1:06 PM, Julien Fischer
<juliensf at csse.unimelb.edu.au> wrote:
>
> On Mon, 16 Feb 2009, Ian MacLarty wrote:
>
>> Estimated time taken: 0.1
>> Branches: main
>>
>> Add cc_multi modes for map.foldl and map.foldr.
>>
>> library/map.m:
>> library/tree234.m:
>>        Add cc_multi modes for foldl and foldr.
>>
>> Index: library/map.m
>> ===================================================================
>> RCS file: /home/mercury1/repository/mercury/library/map.m,v
>> retrieving revision 1.113
>> diff -u -r1.113 map.m
>> --- library/map.m       2 Jan 2009 03:12:08 -0000       1.113
>> +++ library/map.m       15 Feb 2009 23:22:55 -0000
>> @@ -303,6 +303,8 @@
>> :- mode map.foldl(pred(in, in, in, out) is semidet, in, in, out) is
>> semidet.
>> :- mode map.foldl(pred(in, in, mdi, muo) is semidet, in, mdi, muo) is
>> semidet.
>> :- mode map.foldl(pred(in, in, di, uo) is semidet, in, di, uo) is semidet.
>> +:- mode map.foldl(pred(in, in, in, out) is cc_multi, in, in, out) is
>> cc_multi.
>> +:- mode map.foldl(pred(in, in, di, uo) is cc_multi, in, di, uo) is
>> cc_multi.
>>
>> :- func map.foldr(func(K, V, A) = A, map(K, V), A) = A.
>> :- pred map.foldr(pred(K, V, A, A), map(K, V), A, A).
>> @@ -312,6 +314,8 @@
>> :- mode map.foldr(pred(in, in, in, out) is semidet, in, in, out) is
>> semidet.
>> :- mode map.foldr(pred(in, in, mdi, muo) is semidet, in, mdi, muo) is
>> semidet.
>> :- mode map.foldr(pred(in, in, di, uo) is semidet, in, di, uo) is semidet.
>> +:- mode map.foldr(pred(in, in, in, out) is cc_multi, in, in, out) is
>> cc_multi.
>> +:- mode map.foldr(pred(in, in, di, uo) is cc_multi, in, di, uo) is
>> cc_multi.
>
> You may as well also add the (in, in, mdi, muo) mode as well.
>

Done.

Ian.
--------------------------------------------------------------------------
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