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
Syntax vs Operators
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-08-23 (10:16)
From: Damien Doligez <damien.doligez@i...>
Subject: Re: [Caml-list] Syntax vs Operators
On Aug 22, 2005, at 17:55, Jacques Carette wrote:

> I have been going through the documentation, trying to figure out  
> which constructs in Ocaml are syntactic (like :: seems to be) and  
> cannot be oer-ridden, and others like + which are values in  
> Pervasives.  Is there a simple way to find out which language  
> constructs are purely syntactic?

You should look a the lexer documentation:
< >,
in the section titled "Prefix and Infix Symbols", you will get the  
syntax of
all the user-definable symbols.  Some of them are predefined, but you  
guaranteed to be able to override them.  You should avoid overriding  
the ones
that are listed as keywords (in the next section), even if some of them
are actually redefinable in the current implementations.

-- Damien