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
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: 2010-06-09 (15:32)
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