From: Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>
To: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] Re: Toplevel question ...
Date: Mon, 4 Mar 2002 19:42:29 +0100 [thread overview]
Message-ID: <20020304194229.L31447@verdot.inria.fr> (raw)
In-Reply-To: <FD2423AA68A7D511A5A20002A50729E12C1015@orsmsx115.jf.intel.com>; from johnh@ichips.intel.com on Mon, Mar 04, 2002 at 09:10:16AM -0800
Hi,
On Mon, Mar 04, 2002 at 09:10:16AM -0800, Harrison, John R wrote:
> Even if the OCaml developers don't want to add this feature to the
> default toplevel, it must be very easy to support using Camlp4. Perhaps
> Daniel de Rauglaudre or another expert can tell us how?
$ cat it.ml
#load "pa_extend.cmo";
#load "q_MLast.cmo";
open Pcaml;
EXTEND
top_phrase:
[ [ sti = str_item; ";;" ->
match sti with
[ <:str_item< $exp:e$ >> -> Some <:str_item< value it = $e$ >>
| x -> Some x ] ] ]
;
END;
$ ocamlc -pp camlp4r -I +camlp4 -c it.ml
$ ocaml
Objective Caml version 3.04+6 (2002-02-05)
# #load "camlp4o.cma";;
Camlp4std Parsing version 3.04+6 (2002-02-05)
# #load "it.cmo";;
# 2 + 2;;
val it : int = 4
--
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
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 prev parent reply other threads:[~2002-03-04 18:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-04 17:10 Harrison, John R
2002-03-04 18:42 ` Daniel de Rauglaudre [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-02-28 15:49 [Caml-list] " Andrzej M. Ostruszka
2002-03-01 9:36 ` Tomasz Zielonka
2002-03-02 10:25 ` [Caml-list] " Andrzej M. Ostruszka
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=20020304194229.L31447@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