From: "Daniel Bünzli" <daniel.buenzli@epfl.ch>
To: Caml list <caml-list@inria.fr>
Subject: Re: [Caml-list] Typing problem
Date: Sun, 19 Mar 2006 15:58:05 +0100 [thread overview]
Message-ID: <3DDD7978-174E-4E47-8F35-3508FDA31964@epfl.ch> (raw)
In-Reply-To: <20060319.202149.108734866.garrigue@math.nagoya-u.ac.jp>
Le 19 mars 06 à 12:21, Jacques Garrigue a écrit :
> The properties you describe are guaranteed, because all values must be
> created through M.a and M.b.
I thought about that but I wanted to avoid the need to go through
constructors functions (or values à la bigarray). Maybe I'll simply
statically check a little less. It's a tradeoff.
Le 19 mars 06 à 15:23, j h woodyatt a écrit :
> However, 'b is concrete in your example, so-- if it's fully
> representative of your code-- you could just do this, and you would
> still have only one type parameter:
>
> type 'a t = [ `A of 'a | `B of [ `U1 ] ]
> constraint 'a = [< u ]
This won't work because, as I said, I use 'a to express static
constraints about the value stored in the constructors therefore 'a
must be [`U1] whenever a `B is constructed and this is not enforced
by this definition. Having more parameters is not an option either.
Thanks to both of you for your input.
Daniel
prev parent reply other threads:[~2006-03-19 14:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-19 1:30 Daniel Bünzli
2006-03-19 11:21 ` [Caml-list] " Jacques Garrigue
2006-03-19 14:58 ` Daniel Bünzli [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=3DDD7978-174E-4E47-8F35-3508FDA31964@epfl.ch \
--to=daniel.buenzli@epfl.ch \
--cc=caml-list@inria.fr \
/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).