[mercury-users] type (class?) parameters
Michael Day
mcda at students.cs.mu.oz.au
Mon Oct 16 22:12:27 AEDT 2000
> There's no need to use unary for types. A good way to represent numbers as
> sum-of-product types is nat = z | tp1 nat | tp2 nat (0 | 2x+1 | 2x+2) where
> each natural number has a unique representation. It works just as well as a
> type.
I'm afraid I can't quite follow that, particularly tp2 (is that Haskell
syntax?) What do tp1 and tp2 stand for?
:- type nat ---> zero ; tp1(nat) ; tp2 <- what goes here?
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