From: Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Lazy.Value
Date: Mon, 28 May 2001 15:43:50 +0200 [thread overview]
Message-ID: <20010528154350.I13297@verdot.inria.fr> (raw)
In-Reply-To: <20010528151601.B21783@pauillac.inria.fr>; from Xavier.Leroy@inria.fr on Mon, May 28, 2001 at 03:16:01PM +0200
> OK, I see what you mean. If "lazy e" had a special typing rule and a
> special compilation rule -- instead of being expanded into
> "ref (Lazy.Delayed (fun () -> e))" during parsing -- then it would be
> safe to treat it as generalizable, indeed.
Right.
In the present implementation of stream.ml, streams are not mutable
and are "muted" by Obj.set_field. It is hack to allow the empty stream
to be an 'a stream. I thought that it could not create problems, since
it is hidden in the implementation.
But it created a problem (somebody sent me a bug report a long time
ago), due to an optimization in the compiler. I would like to remove
my hack but the consequence is that the empty stream would not be
general.
This is for the moment accepted:
let s = [< >] in [< '1; s >], [< 'true; s >];;
If I program "clean" streams, this would be rejected, except if lazies
can be typed like you say.
- I don't know if this lazy would be useful in other circumstances. It
is the only case I know.
- Or we could accept a new version of not-generalized clean streams, but I
don't know if it would be a problem for people using streams.
It is a problem to restrict things from a version to another, since
according to Murphy's law, there are always people for whom the old
version was absolutely essential. But perhaps not.
--
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
-------------------
To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr
prev parent reply other threads:[~2001-05-28 13:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-28 12:46 Daniel de Rauglaudre
2001-05-28 12:53 ` Xavier Leroy
2001-05-28 13:07 ` Daniel de Rauglaudre
2001-05-28 13:16 ` Xavier Leroy
2001-05-28 13:43 ` Daniel de Rauglaudre [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=20010528154350.I13297@verdot.inria.fr \
--to=daniel.de_rauglaudre@inria.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