From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 A1E80BC57 for ; Sat, 4 Dec 2010 22:00:48 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYAAGM6+kzRVdi0kGdsb2JhbACjJggVAQEBAQkJDAcRBB6lNIlpghmEBC6IVgEBAwWFRASKboYF X-IronPort-AV: E=Sophos;i="4.59,299,1288566000"; d="scan'208";a="81749490" Received: from mail-qy0-f180.google.com ([209.85.216.180]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-MD5; 04 Dec 2010 22:00:48 +0100 Received: by qyk29 with SMTP id 29so11310761qyk.18 for ; Sat, 04 Dec 2010 13:00:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=96a+82NRp4kZFAdPrq4PhO2fKElAj9cD2IGxMcHBbNA=; b=xcGJbG4MyDMjgRoEq4E8N2QO7glCxRkJr+0YdfO+8VvuSdbTvQHAxjQ5vSJ4OSuBDk EKei0e+jhDeNYVi4FsPkIQPh44Z7mvm6KrMuPIML4T4J3LL9e0r/37f6xJtOqx3M2gAR Ma4g4urhi11TGG5JERmt/KR/F6Ef02kjAZz7Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=gtgPDtxH/nQJMvrILUvvHJgQh+PFHgKfxlyvWAnUo4GFoVg6CEee6844tzYxuafHwE TPWTPq8ZanCqUHRXwjtFtgJlN5raGPAqsPoU+xG4VWuKm06hmVaU0KyylibhbsJCNpfz 5mDQQZpNQjMzUMkirUabYwsewx5H37xA5uRCg= Received: by 10.229.246.79 with SMTP id lx15mr2739086qcb.30.1291496446507; Sat, 04 Dec 2010 13:00:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.230.149 with HTTP; Sat, 4 Dec 2010 13:00:26 -0800 (PST) In-Reply-To: References: From: Lukasz Stafiniak Date: Sat, 4 Dec 2010 22:00:26 +0100 Message-ID: Subject: Re: [Caml-list] GADT constructor syntax To: Jacques Le Normand Cc: caml-list caml-list Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; lukasz:01 syntax:01 constructors:01 constructors:01 unifying:01 wrote:01 caml-list:01 constructor:01 constructor:01 int:01 int:01 jacques:03 parameters:03 parameters:03 dec:05 On Sat, Dec 4, 2010 at 9:54 PM, Jacques Le Normand w= rote: > you may want to name your type parameters because you can mix GADT > constructors with normal constructors. consider: > > type 'a term =3D > =A0 =A0 | Ignore of 'a term : int term > =A0 =A0 | Embed of 'a > > I don't think propagating type parameters is a good idea. The current > rule is: ignore type parameters in GADT constructors. This is simpler > than unifying the type parameters with the arguments of the return > type of the constructor. But it expands to: > type 'a term =3D > =A0 =A0 | Ignore of 'a term : int term > =A0 =A0 | Embed of 'a : 'a term