[mercury-users] Idea for a currying library

Richard A. O'Keefe ok at hermes.otago.ac.nz
Wed Jan 19 10:03:20 AEDT 2000


	> It would be very nice if mode &c inference for lambda-expressions were the
	> default, even when everything else was explicit.
	
Fergus Henderson replied:
	Type inference for lambda-expressions is indeed the default.
	Mode and determinism inference for lambda expressions is something
	that the compiler just doesn't know how to do;

The cases we've been considering involve only a single goal.

If you have a single-goal predicate abstraction (or a single-application
function abstraction) where some of the arguments are lambda-bound, the
possible modes are constrained by the possible modes of the underlying
predicate (function).  It's not obvious to me why the corresponding
determinisms would not be identical to those of the underlying predicate
(function).  Surely no new failures can be introduced?

Would automatic mode and determinism inference for single-goal (single-
application) abstractions suffice for most people?  With a multi-goal
abstraction, the _percentage_ of notational overhead isn't so bad.
I think it's having more annotations than active code that's off-putting
for single-goal abstractions.
--------------------------------------------------------------------------
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