[mercury-users] map__foldl2
Fergus Henderson
fjh at cs.mu.OZ.AU
Thu Dec 16 23:04:32 AEDT 1999
On 14-Dec-1999, Warwick Harvey <wharvey at cs.monash.edu.au> wrote:
> Unfortunately, it seems one cannot do this kind of wrapping trick with
> higher-order predicates if you want the result to work in multiple modes.
> :-(
Yes, for that to work nicely, we'd need to be able to infer the modes
for higher-order terms, and for various reasons which have been discussed
on this list long ago, that's not easy.
There is a work-around, but it's not very elegant. For an example,
see the code in the implementation section of library/exception.m,
where the multi-moded higher-order predicate `try' is implemented as a
wrapper around the multi-moded higher-order predicate `builtin_catch'.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list