caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: jehenrik <jehenrik@yahoo.com>
To: Yutaka OIWA <oiwa@yl.is.s.u-tokyo.ac.jp>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] camlp4: ONCE construct
Date: Fri, 10 Jan 2003 20:23:16 -0500	[thread overview]
Message-ID: <42D8BD95-2503-11D7-B29E-00039375801A@yahoo.com> (raw)
In-Reply-To: <vfifzs0zl80.fsf@tuba.is.s.u-tokyo.ac.jp>

> See an article by Francois Pottier at
> http://caml.inria.fr/archives/200107/msg00187.html
> for (almost direct) answer.

Well, for my original question, consider the choice of regular 
expression compilation to be an arbitrary task.  The only point is that 
it be computationally expensive.  I have wanted the same thing in 
completely different contexts.


Jeff Henrikson


jehenrik> Hi,
jehenrik> I would like to write a Camlp4 construct which causes its 
argument to
jehenrik> only be evaluated once.  Eg:

jehenrik> ...
jehenrik> 	...
jehenrik> 		...
jehenrik> 			ONCE Pcre.regexp "([0-9]+)"

jehenrik> would be transformed to:

jehenrik> let gensym000 = Pcre.regexp "([0-9]+)";;
jehenrik> ...
jehenrik> 	...
jehenrik> 		...
jehenrik> 			gensym000

-------------------
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


      reply	other threads:[~2003-01-11  1:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-10 19:14 jehenrik
2003-01-10 22:35 ` Yutaka OIWA
2003-01-11  1:23   ` jehenrik [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=42D8BD95-2503-11D7-B29E-00039375801A@yahoo.com \
    --to=jehenrik@yahoo.com \
    --cc=caml-list@inria.fr \
    --cc=oiwa@yl.is.s.u-tokyo.ac.jp \
    /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).