[m-users.] More modes for map.map_foldl
Volker Wysk
post at volker-wysk.de
Tue Dec 2 05:25:39 AEDT 2025
Hi
I have this code:
angaben_ergaenzen(WerteFelder, !.GegMap, !:GegMap, !IO) :-
map.map_foldl(
(pred(_::in, !.Geg::in, !:Geg::out,
!.IO1::di, !:IO1::uo) is cc_multi :-
(
try []
angaben_ergaenzen_aus_teilen(WerteFelder, !Geg)
then
true
catch TW at teilewiderspruch(_, _, _) ->
teilewiderspruch_melden(TW, !IO1)
)
),
!GegMap,
!IO).
The inner predicate (argument 1 of map_foldl) must be cc_multi, because it
has a try goal in it and catches an exception. But the predicate
map.map_foldl doesn't provide a mode line which matches this.
Could you (the Mercury Team) provide more modes for map_foldl, for the case
when the inner predicate is cc_multi? For my case, it should look like this:
:- mode map_foldl(in(pred(in, in, out, di, uo) is cc_multi),
in, out, di, uo) is cc_multi.
There are also a lot more predicates which should updated this way as well.
Cheers,
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.tar.gz
Type: application/x-compressed-tar
Size: 20604 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/users/attachments/20251201/52f498a8/attachment-0001.bin>
More information about the users
mailing list