[m-dev.] Yet more on EDCGs...

Ralph Becket rbeck at microsoft.com
Sat Jan 29 03:23:16 AEDT 2000


Just tried a little experiment, substituting inline ~x for
var(x) in my syntax proposal:

foldl2(P, Xs, ~x, ~y) -->>
	(
		Xs = []
	;
		Xs = [H | T],
		P(H, ~x, ~y),
		foldl2(P, T, ~x, ~y)
	).

where `P(H, ~x, ~y)' would have been written `P(H) + var(x, y)'
in my earlier notation and expands to `P(H, X0, X1, Y0, Y1)' as
expected.

I've redone a couple of pages of heavily mixed io'n'stuff and
its really quite pleasant - much easier than putting in { }s,
in fact.

Would this be more palatable to those who'd rather annotate
as little as possible (or not at all)?

$x and $=x would retain their current meanings, of course.

Ralph
	
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list