From: bluestorm <bluestorm.dylc@gmail.com>
To: Jeremy Bem <jeremy1@gmail.com>
Cc: caml-list List <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Llama Light: a simple implementation of Caml
Date: Sun, 29 Aug 2010 12:52:22 +0200 [thread overview]
Message-ID: <AANLkTi=DC0XMO=20QOY04ZqXiDh4QN_ozF32N4gXM0Z+@mail.gmail.com> (raw)
In-Reply-To: <AANLkTin9S-d7jy1byqh_5wy69pVss_vxaiutTz7RSryO@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1440 bytes --]
When using the toplevel, declaration phrases fail (looks like a linking
problem), but expressions work as intented :
> $ llama
Llama Light version 0.0828
# 1 + 1;;
- : int = 2
# let x = 1 + 1;;
Error: Reference to undefined global `Toploop'
I made my tests using "llamac -i foo.ml".
I found it startling that the most important difference to my eyes are
buried, on the web page, under lines of relatively boring documentation :
In Llama Light (and in contrast to other Caml implementations):
> - let does not generalize.
- Phrases are generalized immediately. In particular, "let foo = ref []"
> does not typecheck.
- The value restriction is not relaxed. (This is similar to Caml Light.)
> These choices simplify the implementation while having relatively little
> impact on the user.
You cite the "Let Should Not Be Generalised" paper. There is however a
difference in your application of the maxim : in the paper, local let that
have polymorphic type annotations are generalised, while in your system it
is not possible to force generalisation.
I had a look at the typer, and it's indeed rather simple; it seems it would
be quite simple to implement generalized let (when encountering annotations
or with a different syntaxic construct : "letg .. = .. in ..."), but the
added complexity is equivalent to adding let generalization by default.
Is the presence of let-generalization a real issue in your work ?
[-- Attachment #2: Type: text/html, Size: 4782 bytes --]
next prev parent reply other threads:[~2010-08-29 10:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-29 5:42 Jeremy Bem
2010-08-29 10:52 ` bluestorm [this message]
2010-08-29 16:37 ` [Caml-list] " Jeremy Bem
2010-08-29 18:42 ` Jeremy Bem
2010-08-30 10:57 ` ivan chollet
2010-08-30 15:57 ` Jon Harrop
2010-08-30 17:09 ` ivan chollet
2010-08-30 17:39 ` Jon Harrop
2010-09-01 6:21 ` ivan chollet
[not found] ` <AANLkTikbSKCiXVMNsp9DxkW1FxzTFTxDhE=gWPxnqyJ3@mail.gmail.com>
[not found] ` <AANLkTi=dVrqaMchpvPsipasevtNn4Wz_6MWq6nUXjD8E@mail.gmail.com>
[not found] ` <AANLkTi=G2e_6Tn5cOQ5OOPhTLPk6Lsqx2hazt+O+H7gH@mail.gmail.com>
2010-08-30 20:49 ` Jeremy Bem
2010-08-29 13:00 ` ivan chollet
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='AANLkTi=DC0XMO=20QOY04ZqXiDh4QN_ozF32N4gXM0Z+@mail.gmail.com' \
--to=bluestorm.dylc@gmail.com \
--cc=caml-list@yquem.inria.fr \
--cc=jeremy1@gmail.com \
/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