[m-dev.] syntactic suggar suggestion for state variables

Julien Fischer juliensf at csse.unimelb.edu.au
Fri Jan 12 14:40:30 AEDT 2007


On Fri, 12 Jan 2007, Ralph Becket wrote:

> Ondrej Bojar, Friday, 12 January 2007:
>> Ralph Becket wrote:
>>>> Would it be possible to extend the syntax to allow:
>>>>
>>>> :- pred p(mysvtype::!(in, out)) is det.
>>
>> So the question is now, if the type+mode declaration should be:
>>
>> :- pred p(mysvtype::!(in, out)) is det.
>> % more concise
>>
>> or
>>
>> :- pred p(!mysvtype::!(in, out)) is det.
>> % better parallel with the separate mode-type decls.
>

The other place this sort of syntatic sugar would be really useful
is in the heads of lambda expressions:

e.g.

 	X = (pred(!IO::!(di, uo)) is det :-
 		...
 	)

as opposed to:

 	X = (pred(!.IO::di, !:IO::uo) is det :-
 		..
 	)

Julien.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list