[mercury-users] Record syntax

Dominique de Waleffe ddw at miscrit.be
Thu Jan 20 01:29:31 AEDT 2000


This addition to Mercury is very good news.

However I just read  that the record syntax does not allow two labels with
the same name in a given module:

Does this mean I can't have

:-type node1--->n1(id::int,....).
:-type node2--->n2(id::int,....).

in a single module?

Is there a very good reason for this?

It looks to me like the real label names generated by the compiler could
simply include the name of the type... Aren't the types known at compile
time :-)

If I create a sub module for node2:

I'd have to use N1^id and N2^node2__id but the compiler should  know that N1
has type node1 and N2 has type node2, so node2 seems redundant and I don't
want to have to write this...

But of course I may be very naive...

D.

------------------------------------
Dominique de Waleffe
Mission Critical
Tel: + 32 2 757 10 15
Email: ddw at miscrit.be

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