[mercury-users] Colon as a type constructor?

Fergus Henderson fjh at cs.mu.OZ.AU
Mon May 14 23:56:58 AEST 2001


On 14-May-2001, Ondrej Bojar <oboj7042 at ss1000.ms.mff.cuni.cz> wrote:
> I'd like to write pairs with colons and not with dashes :-)
> But colonpair won't work:
> 
> :- type colonpair(A, B) ---> A : B.
> 
> Error: invalid RHS of type definition: A : B.
>
> (I didn't find anywhere that this is not permitted.)

A better error message would be "module name identifier expected before
':' in qualified symbol name".

Currently ":" is the module qualification operator.
The left-hand operand must be a module name.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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