From: "Gurr, David (MED, self)" <David.Gurr@med.ge.com>
To: "Sami Mäkelä" <sajuma@utu.fi>, "Coletta Rémi" <remi.coletta@free.fr>
Cc: caml-list@inria.fr
Subject: RE: [Caml-list] # eval line; (?)
Date: Fri, 10 May 2002 15:39:50 -0500 [thread overview]
Message-ID: <D4DBD8568F05D511A1C20002A55C008C09C29472@uswaumsx03medge.med.ge.com> (raw)
I think that there is a small catch. I think that the definition of
eval is correct, but that if you use it in a toplevel loop, then it
will fail because of the parser not reenterant. -D
> -----Original Message-----
> From: Sami Mäkelä [mailto:sajuma@utu.fi]
> Sent: Thursday, May 09, 2002 12:23 PM
> To: Coletta Rémi
> Cc: caml-list@inria.fr
> Subject: Re: [Caml-list] # eval line; (?)
>
>
> > # line;;
> > - : string = "let b = 1;;"
> >
> > # b;;
> > ^
> > Unbound value b
> >
> > I'm looking for a function like "eval" in LISP, that does
> >
> > # eval line;
> > -: int = 1
> >
> > #b;;
> > - : int = 1
>
> Try:
>
> let eval str =
> Toploop.execute_phrase true Format.std_formatter
> (!Toploop.parse_toplevel_phrase (Lexing.from_string str));;
> -------------------
> To unsubscribe, mail caml-list-request@inria.fr Archives:
> http://caml.inria.fr
> Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ:
http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next reply other threads:[~2002-05-10 20:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-10 20:39 Gurr, David (MED, self) [this message]
2002-05-16 20:23 ` Coletta Rémi
-- strict thread matches above, loose matches on Subject: below --
2002-05-09 13:58 Coletta Rémi
2002-05-09 19:03 ` Warp
2002-05-09 19:22 ` Sami Mäkelä
2002-05-10 18:02 ` Chris Hecker
2002-05-10 19:27 ` Sami Mäkelä
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=D4DBD8568F05D511A1C20002A55C008C09C29472@uswaumsx03medge.med.ge.com \
--to=david.gurr@med.ge.com \
--cc=caml-list@inria.fr \
--cc=remi.coletta@free.fr \
--cc=sajuma@utu.fi \
/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