[m-dev.] for review: improvements for record syntax

schachte at cs.mu.OZ.AU schachte at cs.mu.OZ.AU
Thu Dec 7 08:58:35 AEDT 2000


On  7 Dec, Fergus Henderson wrote:

> Actually it would be nice to allow record syntax in function
> definitions too.  For example:
> 
> 	[H|_] ^ head = H.
> 	[_|T] ^ tail = T.
> 	([_|T] ^ head := H) = [H|T].
> 	([H|_] ^ tail := T) = [H|T].

Sure, that would be nice.  Then you'd also want to be able to use it in
declarations:

	:- func [T|list(T)] ^ head = T.
	:- func array(T) ^ elem(int) = T.

etc.

-- 
Peter Schachte                     The use of COBOL cripples the mind; its
mailto:schachte at cs.mu.OZ.AU        teaching should, therefore, be regarded
http://www.cs.mu.oz.au/~schachte/  as a criminal offense.
PGP: finger schachte at 128.250.37.3      -- E. W. Dijkstra 

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