Version française
Home     About     Download     Resources     Contact us    
Browse thread
Why is this allowed?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Carette <carette@m...>
Subject: Re: [Caml-list] Why is this allowed?
bluestorm wrote:
> It is actually not the case that type structure items can be shadowed :
>
> # module A = struct type t = int;; type t = int end;;
> Error: Multiple definition of the type name t.
>        Names must be unique in a given structure or signature.
>

Exactly.  My desired would be for this non-shadowing restriction to be 
extended to all types, not just type structure items.

Shadowing at the value level is an entirely different issue, and is 
perfectly fine as it is.

Jacques