Browse thread
[Caml-list] Stupid question
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2004-01-16 (12:07) |
From: | Alex Baretta <alex@b...> |
Subject: | Re: [Caml-list] Stupid question |
Frederic van der Plancke wrote: > > Hendrik Tews wrote: > >>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 > > > But you better have a pair of types after '::' ;-) You'd also better make sure that the the type definition is right-recursive through :: , or you won't be able to type-check let fuz = foo :: bar :: buz Alex ------------------- 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