[mercury-users] higher order code

Michael Day mikeday at corplink.com.au
Mon Oct 4 21:43:28 AEST 1999


Hi,

Is there a reason to use call(Predicate, Arg1, Arg2, ... ArgN) rather than
Predicate(Arg1, Arg2, ... ArgN) directly?

Is it possible to write predicates that take other predicates as
arguments, with those predicates taking polymorphic arguments with
typeclass constraints? I've tried a few possibilities:

:- pred higher((pred(T) <= stringable(T))).

or

:- pred higher(pred(T)) <= stringable(T).

but I appear to be getting it wrong.

Thanks,

Michael

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