caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Keiko Nakata <keiko@kurims.kyoto-u.ac.jp>
To: thelema314@gmail.com
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Attach an invariant to a type
Date: Fri, 01 Feb 2008 19:00:17 +0900 (JST)	[thread overview]
Message-ID: <20080201.190017.68537559.keiko@kurims.kyoto-u.ac.jp> (raw)
In-Reply-To: <47A22F01.9070404@gmail.com>

Hello.

> type t = private int isn't legal.  Most types get completely erased
> during compilation, but records and variants have code generated by the
> compiler based off their type declaration to construct a value of that
> type.  A plain int doesn't have this compiler-generated constructor, so
> it can't be private in this way.
> 
> That said, I'd appreciate a simple system to do the kind of checking you
> want at the site of an explicit typecast.

Maybe a previous discussion on the list is interesting to you.
Among this active discussion, the following post by Pierre Weis
looks good new to you.

http://caml.inria.fr/pub/ml-archives/caml-list/2007/11/76aa857050497ee6cf62db65eadd567a.en.html

With best regards,
Keiko


  reply	other threads:[~2008-02-01 10:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-31 13:28 Dawid Toton
2008-01-31 13:50 ` [Caml-list] " Romain Bardou
2008-01-31 17:58   ` David Teller
2008-01-31 18:13     ` Romain Bardou
2008-01-31 19:13       ` Hezekiah M. Carty
2008-01-31 19:29         ` Stéphane Lescuyer
2008-01-31 19:51           ` Dawid Toton
2008-01-31 20:26             ` Edgar Friendly
2008-02-01 10:00               ` Keiko Nakata [this message]
2008-01-31 20:13           ` Romain Bardou
2008-02-10 18:00           ` Stéphane Glondu

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=20080201.190017.68537559.keiko@kurims.kyoto-u.ac.jp \
    --to=keiko@kurims.kyoto-u.ac.jp \
    --cc=caml-list@yquem.inria.fr \
    --cc=thelema314@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;
as well as URLs for NNTP newsgroup(s).