Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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.)

Bye,

Hendrik

-------------------
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