[mercury-users] read_term(T) and Mercury types

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Apr 13 18:24:26 AEST 2003

On 11-Apr-2003, Goncalo Jorge Coelho e Silva <l10454 at alunos.uevora.pt> wrote:
>  Plus, if I had to declare ":- type ResultS == string."
> where's the right place to do it? Between "implementation"
> and "main" I get:
>   inter.m:020: Error: variable on LHS of type definition.
>  Before "implementation" and afterwards
> "main" makes no sense to me. 

You put your type declaration in the right place.  The problem is with
the syntax of the declaration itself.  Any name starting with a capital
letter is a variable name.  Type names should start with a lower case
letter.  So probably what you want is just to use "resultS" rather than

	:- type resultS == string.

Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  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