From: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
To: Joel Reymont <joelr1@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] fighting the type system
Date: Thu, 24 Mar 2011 09:48:05 +0900 [thread overview]
Message-ID: <59D72B1A-4A89-4A13-B585-70B57F45B4AD@math.nagoya-u.ac.jp> (raw)
In-Reply-To: <EA51F199-538A-486F-ADB0-76BE93B96CB2@gmail.com>
On 2011/03/24, at 9:16, Joel Reymont wrote:
>> If you just want the Endpoint interface to specify an object type
>> containing at least write, you could use a private row type:
>
> The private row type is what I was clearly missing.
>
> Why does it work with the private row type, though?
Because if you just define a constrained type every occurrence is
going to be a different instance of this type, while a private row type
ensures that this is the same type throughout the module.
> Are there other uses for 'private' in a module?
>
> Is the use of private row types described somewhere?
They are described described in section 7.9.3 of the manual:
http://caml.inria.fr/pub/docs/manual-ocaml/manual021.html#toc76
You can find more examples in my paper:
http://www.math.nagoya-u.ac.jp/~garrigue/papers/privaterows-aplas2006.pdf
Cheers,
Jacques Garrigue
prev parent reply other threads:[~2011-03-24 0:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-23 22:01 Joel Reymont
2011-03-23 22:19 ` [Caml-list] " Joel Reymont
2011-03-23 23:52 ` Joel Reymont
2011-03-23 23:56 ` [Caml-list] " Jacques Garrigue
2011-03-24 0:16 ` Joel Reymont
2011-03-24 0:48 ` Jacques Garrigue [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=59D72B1A-4A89-4A13-B585-70B57F45B4AD@math.nagoya-u.ac.jp \
--to=garrigue@math.nagoya-u.ac.jp \
--cc=caml-list@inria.fr \
--cc=joelr1@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