From: Michel.Levy@imag.fr (Michel Levy)
To: caml-list@pauillac.inria.fr
Date: Mon, 19 Feb 1996 15:57:09 +0100 [thread overview]
Message-ID: <v01530537ad4e236a223a@[129.88.38.40]> (raw)
Pouvez-vous, je vous prie, répondre à quelques questions à propos de camllight
1) L'expression
let rec x = 1 :: x ;;
est de type int list. Son exécution crée-t-elle une fermeture ?
Je lis d'ailleurs dans le "Doc et user's manual" : the behavior of other
forms of let rec (formes autres que des définitions de fonction) is
implementation-dependant.
2) Pourquoi le typeur accepte la définition récursive précédente mais
21)refuse la modification suivante du programme minicaml (cf Le langage
caml de Pierre Weiss et Xavier Leroy p 352) :
let rec env_étendu =
(déf.Nom, Val_fermeture
{ Définition = liste_de_cas ; Environnement = env_étendu}) ::
env_courant
sous le prétexte que déf.Nom n'est pas acceptable dans une définition récursive
22)accepte par contre
let nom = déf.Nom in
let rec env_étendu =
(nom, Val_fermeture
{ Définition = liste_de_cas ; Environnement = env_étendu}) ::
env_courant
Remarque : mon but était d'éviter les types mutables pour représenter les
environnements.
Michel Levy
L.S.R.
BP53x - 38041 Grenoble cedex - France
Tel : 76827246
e.mail : Michel.Levy@imag.fr
next reply other threads:[~1996-02-20 18:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-02-19 14:57 Michel Levy [this message]
1996-02-20 18:48 ` your mail Pierre Weis
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='v01530537ad4e236a223a@[129.88.38.40]' \
--to=michel.levy@imag.fr \
--cc=caml-list@pauillac.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).