Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] :: operator not quotable using ( ... )
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-04-25 (08:52)
From: John Prevost <visigoth@c...>
Subject: Re: [Caml-list] :: operator not quotable using ( ... )
>>>>> "rv" == Remi VANICAT <> writes:

    rv> cons is not really an operator, it's a constructor

    >>  let cons x y = x :: y

    rv> the same hold for any constructor :

Ahh, I had forgotten, thanks.  It might be good, then, to cause (::)
to return the same kind of error as a constructor does, instead of:

# Cons;;
The constructor Cons expects 2 argument(s),
but is here applied to 0 argument(s)
# (::);;
Syntax error

At the very least, this will remind people what the real problem is.
Making constructors usable as functions might be desirable, but I'm
okay with not having it as long as we have good error messages.  :)

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: