From: Jerome Vouillon <vouillon@clipper.ens.fr>
To: Ernesto Posse <mposada@impsat.net.co>
Cc: Caml List <caml-list@pauillac.inria.fr>
Subject: Re: Type constraints
Date: Fri, 30 May 1997 14:17:17 +0200 (MET DST) [thread overview]
Message-ID: <Pine.SUN.3.95.970530140131.14186A-100000@vedette> (raw)
In-Reply-To: <338DD17B.62C6@impsat.net.co>
On Thu, 29 May 1997, Ernesto Posse wrote:
> type 'a node = {x: 'a; y: t1}
> and t1 = A | B of t1*t1
> and t2 = C | D of (string * t2) node | E of bool node
>
> I obtain this message:
>
> Characters 98-102:
> This type parameter bool should be an instance of type string * t2
In the current release, in mutually recursive type definitions, all
occurrences of a type being defined (here, for instance, 'a node) must
have the same parameters.
This overly restrictive constraint will be removed in the next
release. In the meantime, as Didier Rousseau noticed, you can move
the definition of type t2 out of the recursive type definition:
type 'a node = {x: 'a; y: t1}
and t1 = A | B of t1*t1
type t2 = C | D of (string * t2) node | E of bool node
-- Jerome Vouillon
next prev parent reply other threads:[~1997-05-30 12:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-05-29 18:56 Ernesto Posse
1997-05-30 7:41 ` Pascal Brisset
1997-05-30 9:24 ` Didier Rousseau
1997-05-30 10:01 ` Vale'rie Me'nissier-Morain
1997-05-30 11:09 ` Wolfgang Lux
1997-05-30 12:17 ` Jerome Vouillon [this message]
2004-12-06 19:55 Jim Farrand
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=Pine.SUN.3.95.970530140131.14186A-100000@vedette \
--to=vouillon@clipper.ens.fr \
--cc=caml-list@pauillac.inria.fr \
--cc=mposada@impsat.net.co \
/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).