Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Jacques Le Normand <rathereasy@gmail.com>
To: Gabriel Scherer <gabriel.scherer@gmail.com>
Cc: "Lukasz Stafiniak" <lukstafi@gmail.com>,
	"Milan Stanojević" <milanst@gmail.com>, Caml <caml-list@inria.fr>
Subject: Re: [Caml-list] GADT definition
Date: Thu, 19 Dec 2013 18:47:29 -0500	[thread overview]
Message-ID: <CAK0y-35RR0ybfsW+EpogesmYpeUE1C5Uv=pjyvrk-vgSe9SNpw@mail.gmail.com> (raw)
In-Reply-To: <CAPFanBH1nNsaqDQZDkBEY_9=iEM2i=n0wUeFYFBfp2VC8hzsaA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1202 bytes --]

or type _ s = S


On Thu, Dec 19, 2013 at 6:10 PM, Gabriel Scherer
<gabriel.scherer@gmail.com>wrote:

> 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 = S of 'a
> (or just type 'a s = 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 <lukstafi@gmail.com>wrote:
>
>> On Thu, Dec 19, 2013 at 11:27 PM, Milan Stanojević <milanst@gmail.com>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 <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 before
>>> sending.)
>>> >>
>>> > No, that's not it. My question is still open.
>>>
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 2624 bytes --]

      reply	other threads:[~2013-12-19 23:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-19 22:17 Lukasz Stafiniak
2013-12-19 22:20 ` Lukasz Stafiniak
2013-12-19 22:21   ` Lukasz Stafiniak
2013-12-19 22:27     ` Milan Stanojević
2013-12-19 22:35       ` Lukasz Stafiniak
2013-12-19 23:10         ` Gabriel Scherer
2013-12-19 23:47           ` Jacques Le Normand [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK0y-35RR0ybfsW+EpogesmYpeUE1C5Uv=pjyvrk-vgSe9SNpw@mail.gmail.com' \
    --to=rathereasy@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=gabriel.scherer@gmail.com \
    --cc=lukstafi@gmail.com \
    --cc=milanst@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox