From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id CB02D7EC6E for ; Fri, 20 Dec 2013 00:11:26 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.214.47; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.214.47 as permitted sender) identity=mailfrom; client-ip=209.85.214.47; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-bk0-f47.google.com) identity=helo; client-ip=209.85.214.47; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-bk0-f47.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao0BAON7s1LRVdYvm2dsb2JhbABZhBiDA7YtgQ4IFg4BAQEBAQYLCwkUKIIlAQEBAwEjHQEbEgsBAwELBgUEBwMKKgICIQEBEQEFARwGE4dvAQMJCKVHjAdTgwmOBgoZJw1khhgRAQUMjHOBMREBUAeCboFIBJYrgWuMWoNNGCmEWDuBNQ X-IPAS-Result: Ao0BAON7s1LRVdYvm2dsb2JhbABZhBiDA7YtgQ4IFg4BAQEBAQYLCwkUKIIlAQEBAwEjHQEbEgsBAwELBgUEBwMKKgICIQEBEQEFARwGE4dvAQMJCKVHjAdTgwmOBgoZJw1khhgRAQUMjHOBMREBUAeCboFIBJYrgWuMWoNNGCmEWDuBNQ X-IronPort-AV: E=Sophos;i="4.95,515,1384297200"; d="scan'208";a="41782923" Received: from mail-bk0-f47.google.com ([209.85.214.47]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 20 Dec 2013 00:11:26 +0100 Received: by mail-bk0-f47.google.com with SMTP id mx12so937205bkb.6 for ; Thu, 19 Dec 2013 15:11:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=hjE7Q2i2bKjeUUMrUnSyvIgZo6ODbj5ZpMB5KCqAskE=; b=yfso3CgifrVOGqFajkww8QGsld30lSP8TFa+vDPoJljUAMtYpRGIeeguITP3/L3IWD x2llHVJKEKHN01HWGgQhg5gq8YR74YN+jBMCDkZEHTEIa7DOy5tj1hLKK1PT+W4OXwPe QsmoKrtrgSiA/v+8xAtm734O1end7Gh+phhHJEbWCd4EG72iUjIuVGVVoR/dIAoYJjS1 6tBUN6tFLpji3Tmt6cpmM2FdX61+YsafcuEu7JD9btBSKOWwWEGd1DQ7Y8T2rj8BUjBl jePQ8lI4TEOo/6RseaaCr2NbYaYriasESqaolZQQyjGGXQyUaqZXrSPNp15P5navUIQp PQnA== X-Received: by 10.204.103.65 with SMTP id j1mr137081bko.55.1387494685464; Thu, 19 Dec 2013 15:11:25 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.122.72 with HTTP; Thu, 19 Dec 2013 15:10:44 -0800 (PST) In-Reply-To: References: From: Gabriel Scherer Date: Fri, 20 Dec 2013 00:10:44 +0100 Message-ID: To: Lukasz Stafiniak Cc: =?ISO-8859-2?Q?Milan_Stanojevi=E6?= , Caml Content-Type: multipart/alternative; boundary=001a11334508db1d5004edeb4786 Subject: Re: [Caml-list] GADT definition --001a11334508db1d5004edeb4786 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable type z type _ s Don't use this kind of abstract type definition. Use instead (and export) concrete definitions (even if you don't use their constructors for anything) type 'a s =3D S of 'a (or just type 'a s =3D S) They have "better" injectivity properties. We've mentioned in on the mailing-list a couple of time, and it's also the "easy take-away lesson" from Jacques Garrigue talk at the OCaml workshop in September. On Thu, Dec 19, 2013 at 11:35 PM, Lukasz Stafiniak wrot= e: > On Thu, Dec 19, 2013 at 11:27 PM, Milan Stanojevi=C4=87 wrote: > >> What version of ocaml are you using? It works for me on 4.00.1 >> >> OCaml 4.01.0 from OPAM. > > On Thu, Dec 19, 2013 at 5:21 PM, Lukasz Stafiniak >> wrote: >> > On Thu, Dec 19, 2013 at 11:20 PM, Lukasz Stafiniak >> > wrote: >> >> >> >> Sorry! I've spotted it reading the email. (I should read before >> sending.) >> >> >> > No, that's not it. My question is still open. >> > > --001a11334508db1d5004edeb4786 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
type z
type _ s

Do= n't use this kind of abstract type definition. Use instead (and export)= concrete definitions (even if you don't use their constructors for any= thing)

type 'a s =3D S of 'a
(or just ty= pe 'a s =3D S)

They have "better" in= jectivity properties. We've mentioned in on the mailing-list a couple o= f time, and it's also the "easy take-away lesson" from Jacque= s Garrigue talk at the OCaml workshop in September.


On Thu,= Dec 19, 2013 at 11:35 PM, Lukasz Stafiniak <lukstafi@gmail.com>= wrote:
=
On Thu, Dec 19, 2013 at 11:27 = PM, Milan Stanojevi=C4=87 <milanst@gmail.com> wrote:
What version of ocaml are you using? It work= s for me on 4.00.1

=C2=A0OCaml 4.01.0 from O= PAM.

<= div>
On Thu, Dec 19, 2013 at 5:21 PM, Lukasz Stafiniak <lukstafi@gmail.com> wrote:
> On Thu, Dec 19, 2013 at 11:20 PM, Lukasz Stafiniak <lukstafi@gmail.com>
> wrote:
>>
>> Sorry! I've spotted it reading the email. (I should read befor= e sending.)
>>
> No, that's not it. My question is still open.


--001a11334508db1d5004edeb4786--