From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 02285BBAF for ; Mon, 31 May 2010 17:06:30 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmwCAHJtA0xIDtyfkGdsb2JhbACeKwgVAQEBAQkJDAcRAx+xAIIChRAuiE8BAQMFhREE X-IronPort-AV: E=Sophos;i="4.53,334,1272837600"; d="scan'208";a="51492492" Received: from fg-out-1718.google.com ([72.14.220.159]) by mail3-smtp-sop.national.inria.fr with ESMTP; 31 May 2010 17:06:30 +0200 Received: by fg-out-1718.google.com with SMTP id d23so560053fga.9 for ; Mon, 31 May 2010 08:06:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=dap1hfdypQ5z872bK6U+f2EjyQi8kWhNtFxxhTo6Vrw=; b=QoIOaU5hmU/7MmK9FrAbwD3eUm40lvB/4+SpHCYBwr6ZCeDR1yqAb+91haIpJ+kuvb RcOIa0gowgqmM7VgZXVYCopT4zxj+4IviVXFCJFwFRo6W1i5HTZQDZR0EM1iwuxUqnwa cccdzCb5f2z/5eFDQWwHdUnGi43O8CAZyykFs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=SsdWHwXjIQ6hnH5+sR6JFv3eT9b1rZJcvEFpO40Txecn8AstQ/hKSBcbObsxq8bCAz fmGcOUBfS3udHQ5AJzq8brSERT2tEqD1eirfKb5dsYz9SPA4qMN/e2wrlRQTwICxRG7N MWluyresfH1B1rkF65vZvTE3Ss/695kiCyDiI= MIME-Version: 1.0 Received: by 10.103.67.20 with SMTP id u20mr1946058muk.97.1275318390375; Mon, 31 May 2010 08:06:30 -0700 (PDT) Received: by 10.204.26.195 with HTTP; Mon, 31 May 2010 08:06:30 -0700 (PDT) In-Reply-To: <4C03CBD3.3010606@mcmaster.ca> References: <4C03CBD3.3010606@mcmaster.ca> Date: Mon, 31 May 2010 17:06:30 +0200 Message-ID: Subject: Re: [Caml-list] Why is this allowed? From: Lukasz Stafiniak To: Jacques Carette Cc: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 X-Spam: no; 0.00; lukasz:01 foo:01 foo:01 wrote:01 caml-list:01 variant:02 variant:02 expression:02 mcmaster:02 labels:03 algebraic:03 override:03 module:03 jacques:03 let:03 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 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?