[mercury-users] Another Mercury Modes Problem

Michael Day mikeday at bigpond.net.au
Tue May 28 15:44:52 AEST 2002


> Problem: list/1 is not a data constructor or a parametric inst.  You
> probably mean list_skel/1.

No, he meant list/1! I've mentioned this before, that list_skel is not a 
good name.

Look at these two declarations:

:- type list(T) ---> [] ; [T|list(T)].
:- inst list_skel(T) ---> [] ; [T|list_skel(T)].

The same thing! So why tack on this _skel? It would make as much sense to 
name the type list_skel. Every type/inst is a skeleton of the data 
structure that will eventually be created, after all.

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