From: Sven LUTHER <luther@phivolcs.dost.gov.ph>
To: Didier Rousseau <Didier.Rousseau@cnam.fr>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: types recursifs ...
Date: Wed, 14 May 1997 14:39:41 +0800 [thread overview]
Message-ID: <33795E2D.7993B0CA@phivolcs.dost.gov.ph> (raw)
In-Reply-To: <199704301242.OAA00827@fermi.cnam.fr>
Didier Rousseau wrote:
>
> Sven LUTHER wrote:
>
> > ...
> > si ('a t as 'a) designe un type recursif alors 'a et 'a t devrait etre
> > les memes types
> >
> > et donc term t devient (term t as term) et donc term t et term sont les
> > memes types.
> > ...
>
> Prenons un exemple :
> le type predefini, list, est equivalent a cette definition :
> type 'a list = [] | :: of 'a*'a list
>
> si l'on utilise ce type avec des "int" : int list
> il est claire que "int" et "int list" sont deux types differents !!
>
En fait ce que je voulais c'est bel et bien definir un type recursif,
c'est a dire du type :
'a t as 'a, ou peut etre 'a list as 'a.
cela est-il possible en Caml ?
d'apres la discution sur ce sujet, je ne pense pas que ce soit possible.
y a-t-il un autre mecanisme pour etendre un type, voir un module, un peu
a la facon
de l'heritage pour les objets, quelque choses qui permettrait d'etendre
un type ou un
module, eventuellement dynamiquement ?
Sven LUTHER
next prev parent reply other threads:[~1997-05-14 6:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-04-28 3:07 Sven LUTHER
1997-04-29 14:22 ` Didier Rousseau
1997-04-30 2:50 ` Sven LUTHER
1997-04-30 12:42 ` Didier Rousseau
1997-05-14 6:39 ` Sven LUTHER [this message]
1997-05-14 8:39 ` Emmanuel Engel
1997-05-15 17:30 ` Jerome Vouillon
1997-05-14 15:00 ` [LONG] " Christian Boos
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=33795E2D.7993B0CA@phivolcs.dost.gov.ph \
--to=luther@phivolcs.dost.gov.ph \
--cc=Didier.Rousseau@cnam.fr \
--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).