From: Pierre Weis <Pierre.Weis@inria.fr>
To: frisch@clipper.ens.fr (Alain Frisch)
Cc: caml-list@inria.fr
Subject: Re: Implicit constraints in type declaration
Date: Sun, 21 Jan 2001 22:31:16 +0100 (MET) [thread overview]
Message-ID: <200101212131.WAA21703@pauillac.inria.fr> (raw)
In-Reply-To: <Pine.GSO.4.04.10101211732070.1305-100000@clipper.ens.fr> from Alain Frisch at "Jan 21, 101 05:59:06 pm"
> Hello,
>
> I don't understand why the following type declaration implies a
> constraint:
>
> # type 'a t = int and b = int t;;
> type 'a t = int constraint 'a = int
> type b = int t
>
> Also, I don't understand this error message (I can imagine why
> the declaration is illegal):
>
> # type 'a t = u and u = int;;
> ^^^^^^^
> A type variable is unbound in this type declaration
>
>
> --
> Alain Frisch
All those glitches were due to a strange way of type cheking type
definitions using unification. Jacques (Garrigue) reimplemented the
old semantics for ordinary type definitions. Thus, your examples now
work fine in the working version of the compiler:
Objective Caml version 3.00+20 (2000-12-03)
# type 'a t = int and b = int t;;
type 'a t = int
type b = int t
# type 'a t = u and u = int;;
type 'a t = u
type u = int
Best regards,
Pierre Weis
INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/
prev parent reply other threads:[~2001-01-21 21:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-21 16:59 Alain Frisch
2001-01-21 21:31 ` Pierre Weis [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=200101212131.WAA21703@pauillac.inria.fr \
--to=pierre.weis@inria.fr \
--cc=caml-list@inria.fr \
--cc=frisch@clipper.ens.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