From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 9D9F5BBAF for ; Mon, 31 May 2010 17:49:48 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgcDAP93A0yCcUBTaGdsb2JhbACeSA0FBgoHESLAYIUWBA X-IronPort-AV: E=Sophos;i="4.53,334,1272837600"; d="scan'208";a="51495285" Received: from sigma957.cis.mcmaster.ca ([130.113.64.83]) by mail3-smtp-sop.national.inria.fr with ESMTP; 31 May 2010 17:49:47 +0200 Received: from Dura7.UTS.McMaster.CA (dura7.UTS.mcmaster.ca [130.113.196.62]) by sigma957.cis.mcmaster.ca (8.13.7/8.13.7) with ESMTP id o4VFnBVt015490; Mon, 31 May 2010 11:49:45 -0400 (EDT) Received: from cgpsrv2.cis.mcmaster.ca (univmail.CIS.McMaster.CA [130.113.64.46]) by Dura7.UTS.McMaster.CA (8.13.7/8.13.7) with ESMTP id o4VFmxPS028617; Mon, 31 May 2010 11:48:59 -0400 Received: from [129.97.169.240] (account carette@univmail.cis.mcmaster.ca [129.97.169.240] verified) by cgpsrv2.cis.mcmaster.ca (CommuniGate Pro SMTP 5.2.12) with ESMTPSA id 304638041; Mon, 31 May 2010 11:49:00 -0400 Message-ID: <4C03DA6B.2030807@mcmaster.ca> Date: Mon, 31 May 2010 11:48:59 -0400 From: Jacques Carette User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Lukasz Stafiniak Cc: caml-list@inria.fr Subject: Re: [Caml-list] Why is this allowed? References: <4C03CBD3.3010606@mcmaster.ca> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version-Mac: 5.5.9.395186, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2010.5.31.154214 X-PerlMx-Spam: Gauge=IIIIIIII, Probability=8%, Report=' BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1000_LESS 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, BODY_SIZE_700_799 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MOZILLA_MSGID 0, __SANE_MSGID 0, __URI_NO_PATH 0, __URI_NO_WWW 0, __URI_NS , __USER_AGENT 0' X-Spam-Flag: NO X-Spam: no; 0.00; lukasz:01 foo:01 foo:01 wrote:01 wrote:01 caml-list:01 variant:02 variant:02 expression:02 mcmaster:02 mcmaster:02 labels:03 algebraic:03 override:03 module:03 Lukasz Stafiniak wrote: > But what when someone includes or opens a module with Foo after "type > foo = Foo"? What when someone opens it locally in an expression? > I would be fine if type-level shadowing was disallowed for all those cases. > 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? > That would be nice. Jacques > On Mon, May 31, 2010 at 4:46 PM, Jacques Carette 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? >>