From: Jerome Vouillon <vouillon@clipper.ens.fr>
To: Frank Christoph <christo@nextsolution.co.jp>
Cc: caml-list@pauillac.inria.fr
Subject: Re: As-binding #-types
Date: Thu, 12 Sep 1996 13:56:44 +0200 (MET DST) [thread overview]
Message-ID: <Pine.3.89.9609121339.A13757-0100000@vedette> (raw)
In-Reply-To: <9609120953.AA00876@sparc3.nextsolution.co.jp>
> #type 'a mytype = Mk of #myclass as 'a;;
> Unbound row variable in #myclass
In a type definition, type parameters *must* be free variables. But, here,
you try to bind the type parameter 'a to #myclass. So, this definition
fails. Actually, the compiler sees that #myclass contains a row variable
that obviously cannot be a type parameter, and hence rejects this phrase.
You can remove the constraint and just write
#type 'a mytype = Mk of 'a;;
I don't think omitting the type constraint is a problem in practice.
However, I plan to add constrained type definitions to the language in the
future. Then you will probably be able to write your type definition as
#type (#myclass as 'a) mytype = Mk of 'a;;
Jerome
next prev parent reply other threads:[~1996-09-12 15:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-09-12 9:53 Frank Christoph
1996-09-12 11:56 ` Jerome Vouillon [this message]
1996-09-12 12:13 ` As-binding #-types/Evaluation order & State Frank Christoph
1996-09-13 9:24 ` Francois Rouaix
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.3.89.9609121339.A13757-0100000@vedette \
--to=vouillon@clipper.ens.fr \
--cc=caml-list@pauillac.inria.fr \
--cc=christo@nextsolution.co.jp \
/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