[mercury-users] type (class?) parameters

Michael Day mcda at students.cs.mu.oz.au
Sat Oct 14 10:55:27 AEDT 2000


> (a) Simply don't include the non-type parameters in the type.
> Instead pass them around as ordinary value parameters if needed.

Right, doesn't help with type checking though...

> (b) Represent numbers as types, e.g. using unary notation.

Heh didn't think of this, it seems to crop up quite a lot recently. Have
to give it a try :) Though perhaps vector(succ(succ(succ(zero))), float)
is not quite as succinct as vector(3, float)...

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