[mercury-users] Semantics of 'new'

Ralph Becket rafe at cs.mu.OZ.AU
Thu Feb 6 10:33:14 AEDT 2003

`new ...' is covered in the reference manual under the part on
existentially quantified types.

If a type has a data constructor foo(...), say, containing an
existentially quantified type variable in an argument, then you have to
use 'new foo'(...) to construct such a value (you just use foo(...) for
deconstruction.)  The 'new ...' prefix is necessary at the moment to
allow our analysis to know which are constructions and which are
deconstructions in code using existentially quantified types.

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