From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id F0CECBC6B for ; Wed, 23 Jan 2008 22:35:22 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAEpCl0fRVYT7i2dsb2JhbACLWYRFAQEBCAQECRsFljuHI4EV X-IronPort-AV: E=Sophos;i="4.25,240,1199660400"; d="scan'208";a="21700897" Received: from an-out-0708.google.com ([209.85.132.251]) by mail4-smtp-sop.national.inria.fr with ESMTP; 23 Jan 2008 22:35:21 +0100 Received: by an-out-0708.google.com with SMTP id b15so742151ana.102 for ; Wed, 23 Jan 2008 13:35:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; bh=e3BzH3GUuLz6IgJeM6rnIck5jLG0DPYJFqi7t6z55vc=; b=nJHXrH6ls/hAqa8Syeg7dFpTYpx5XxWPliSUnZX7USGcgGL0wgZEfBe77XJu09usqwYE0CzEiL4LTe2tTxRLJ/NvbPr7GyjszBDiITmffIFxcPoSS2hYvd99ubt8dRHx9pp2JNAgahGbeGxelaOUkUR6Ge8tG4CZMIk45dywqxM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=XJAP5xryfUbi4E+198eusNYJW0QUjbetMwhjpdwpxu/HKZPFEz+rCQdIztHbuyRuQDGMPTTx+nofonoVImu+rvxocGXDiuLktgk7pOKIlQENzlbT1XRBoyJgwd/AS17AjNfNzCrAXZ4Ef+j6SPtzOtd00dT08OOgMSql695O7F4= Received: by 10.101.68.19 with SMTP id v19mr21418542ank.4.1201124120418; Wed, 23 Jan 2008 13:35:20 -0800 (PST) Received: from ?192.168.0.16? ( [71.149.129.152]) by mx.google.com with ESMTPS id b37sm14827866ana.23.2008.01.23.13.35.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 23 Jan 2008 13:35:18 -0800 (PST) Message-ID: <4797B314.8040008@gmail.com> Date: Wed, 23 Jan 2008 15:35:16 -0600 From: Edgar Friendly User-Agent: Thunderbird 2.0.0.6 (X11/20071022) MIME-Version: 1.0 To: blue storm Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] small Camlp4 code : get a free name References: <527cf6bc0801231159o7c001a73lddd74e5b3cb30061@mail.gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; camlp:01 compiler:01 camlp:01 compiler:01 edgar:98 wrote:01 caml-list:01 jambon:01 define:02 define:02 compiling:02 variables:02 seems:03 seems:03 module:03 Martin Jambon wrote: > Nice, but in theory, it may create identifiers that are bound to an > incorrect value when the programmer forgot to define such a value. > > For example, module A should provide A.x to module B (= another .ml file). > If the programmer forgets to define A.x, the compiler should report the > error at the time of compiling b.ml. But if some camlp4 extension > operating over a.ml introduces a variable A.x and by chance it has the > same type as the expected A.x, then the compiler will remain silent and > B will use the wrong value for A.x. > > > Martin > It seems to me that the only way to satisfy this requirement involves a distinct namespace for these variables. Maybe Camlp4.Unique_identifiers.? But this seems isomorphic to the simpler solution of claiming a portion of the identifier space: __camlp4_unique_identifier_. E