English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Stupid question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-01-16 (10:02)
From: Hendrik Tews <tews@t...>
Subject: Re: [Caml-list] Stupid question
Brian Hurt writes:
   OK.  This makes more sense.  Well, except for the nitpicking detail that 
   true and false are not valid variant type identifiers, they should be True 
   and False.
There is a special exception: true, false, [], (), and :: are
constructor names, see 6.3 Naming objects. One can ideed write 

# type x = true of int | () of string | :: of float

only [] do not work as (not ;-)) expected: 

# type x = [] of int;;
Syntax error

(I think I filed a bug report about [], but the ocaml web pages
are just not reachable, so I can't give a reference.)



To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners