Browse thread
Why is this allowed?
[
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: | 2010-05-31 (15:06) |
From: | Lukasz Stafiniak <lukstafi@g...> |
Subject: | Re: [Caml-list] Why is this allowed? |
But what when someone includes or opens a module with Foo after "type foo = Foo"? What when someone opens it locally in an expression? Does a variant value have a unique type with a unique path so that it would be possible to guarantee that within this unique path there are no type *definitions* that override a variant name? On Mon, May 31, 2010 at 4:46 PM, Jacques Carette <carette@mcmaster.ca> wrote: > type foo = Foo > let x = Foo > > type foo2 = Foo | Bar > let y = Foo > let z = (x,y) ;; > > I thought that re-using of algebraic labels was not allowed - but apparently > it is?