From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q2MC562I001454 for ; Thu, 22 Mar 2012 13:05:09 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApABAOMUa0/RVdm2mGdsb2JhbABEtzAIIgEBAQEBCAkNBxQnggAJAQEBAwESAhMZARsdAQMBCwYFAwEHOyIBEQEFARwGEyKHYwWacwqME4JxhRg/iHYBBQuQWQSVX45JPYQK X-IronPort-AV: E=Sophos;i="4.73,629,1325458800"; d="scan'208";a="150702352" Received: from mail-lb0-f182.google.com ([209.85.217.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 22 Mar 2012 13:05:09 +0100 Received: by lboi15 with SMTP id i15so2801714lbo.27 for ; Thu, 22 Mar 2012 05:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=UzNEJkUlJmpKOkJKb9WC+hS0ltjoJ+z4j3KX+MpVtRU=; b=bwu0vNbaK3xwk1luC7/MSeHCQknDG8pZf2XvAEptLbwBj6mhvW8S67cxRdYeSP8XtJ mUQWBwBGc/5dQdWzg1lqW73yVEeizNIer0CbOTs/RW/w/UI6bxCJ8KV6UhEO944mNq3f KBDrwroi3YcHCMsjZMl3OrmzbtI3y9Z/pO/+Wr/3zng17U7wSY+ff7AspKOJ8GtwJk+5 fBGtIAizVCXjndE4UJhbnWCpx/8iqTekYpCvLOgIoF8Afn89FXdQlJ/tOcBBIgaEJvSz nTcPcEoHhG072NS/yw1ahPO1srVZjtNaAJ2MVmxHDDZjqDhLXtGLwUCEP+8DbKipmt0B EP0Q== MIME-Version: 1.0 Received: by 10.152.146.163 with SMTP id td3mr5519568lab.31.1332417908694; Thu, 22 Mar 2012 05:05:08 -0700 (PDT) Received: by 10.112.108.65 with HTTP; Thu, 22 Mar 2012 05:05:08 -0700 (PDT) In-Reply-To: <20120322095143.GA30016@voyager> References: <20120322095143.GA30016@voyager> Date: Thu, 22 Mar 2012 13:05:08 +0100 Message-ID: From: Julien Signoles To: Roberto Di Cosmo Cc: caml-list@inria.fr Content-Type: multipart/alternative; boundary=e89a8f23456723ddbb04bbd3b84b Subject: Re: [Caml-list] Funny name for a type variable in the output: should this be filed on the BTS? --e89a8f23456723ddbb04bbd3b84b Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello, Le 22 mars 2012 10:51, Roberto Di Cosmo a =E9crit : > val length : ('a1, 'b) l -> int =3D > > Why do we get 'a1, and not 'a, in the type? > > Well, probably, since 'a is instantiated to int during > type checking, it may be the case that 'a, as type name, is > still marked as taken during the type output, so we get ('a1,'b) > > The type is perfectly sound... it is just 'surprising' for > a regular user... do you think this should be considered a bug? > IMHO it is not a bug (as you said, the type is sound), but you could write a feature request like "generate variable name as best as possible"... -- Julien --e89a8f23456723ddbb04bbd3b84b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello,

Le 22 mars 2012 10:51, Roberto Di = Cosmo <roberto@= dicosmo.org> a =E9crit :
=A0 val length : ('a1, 'b) l -> int =3D <fun>

Why do we get 'a1, and not 'a, in the type?

Well, probably, since 'a is instantiated to int during
type checking, it may be the case that 'a, as type name, is
still marked as taken during the type output, so we get ('a1,'b)

The type is perfectly sound... it is just 'surprising' for
a regular user... do you think this should be considered a bug?

IMHO it is not a bug (as you said, the type is sound), but yo= u could write a feature request like "generate variable name as best a= s possible"...

--
Julien
--e89a8f23456723ddbb04bbd3b84b--