caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Valerie.Menissier-Morain@dyade.fr (Vale'rie Me'nissier-Morain)
To: mposada@impsat.net.co
Cc: caml-list@pauillac.inria.fr
Subject: Re: Type constraints
Date: Fri, 30 May 1997 12:01:21 +0200	[thread overview]
Message-ID: <199705301001.MAA32195@ebene.inria.fr> (raw)
In-Reply-To: <338DD17B.62C6@impsat.net.co> (message from Ernesto Posse on Thu, 29 May 1997 13:56:59 -0500)

Why do you need to define t2 simultaneously to 'a node and t1?

The following session is ok in Caml Light

>       Caml Light version 0.73

#type 'a node = {x: 'a; y: t1}
and t1 = A | B of t1*t1;;
Type node defined.
Type t1 defined.
#type t2 = C | D of (string * t2) node;;
Type t2 defined.
#type t2 = C | D of (string * t2) node | E of bool node;;
Type t2 defined.
#

or, if you prefer in Objective Caml

        Objective Caml version 1.05

# type 'a node = {x: 'a; y: t1}
a  nd t1 =   A | B of t1*t1;;
type 'a node = { x: 'a; y: t1 }
type t1 = | A | B of t1 * t1
# type t2 = C | D of (string * t2) node;;
type t2 = | C | D of (string * t2) node
# type t2 = C | D of (string * t2) node | E of bool node;;
type t2 = | C | D of (string * t2) node | E of bool node

V. Ménissier-Morain




  parent reply	other threads:[~1997-05-30 12:06 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 [this message]
1997-05-30 11:09 ` Wolfgang Lux
1997-05-30 12:17 ` Jerome Vouillon
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=199705301001.MAA32195@ebene.inria.fr \
    --to=valerie.menissier-morain@dyade.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).