caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Alexander V.Voinov" <avv@quasar.ipa.nw.ru>
To: daniel.de_rauglaudre@inria.fr
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] a quick question on camlp4
Date: Thu, 17 Oct 2002 10:07:35 -0700 (PDT)	[thread overview]
Message-ID: <20021017.100735.41641743.avv@quasar.ipa.nw.ru> (raw)
In-Reply-To: <20021017185517.H32600@verdot.inria.fr>

From: Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>
Subject: Re: [Caml-list] a quick question on camlp4
Date: Thu, 17 Oct 2002 18:55:17 +0200

> Hi,
> 
> On Thu, Oct 17, 2002 at 09:28:31AM -0700, Alexander V.Voinov wrote:
> 
> > Is it possible to eliminate the keyword 'function' from this,
> > that is to implement an extension like:
> > 
> > iterate <list> with <pat1> -> <expr1> | <pat2> -> <expr2> ...
> 
> Not a problem to keep 'function' since it is already a keyword in
> OCaml (normal syntax).
> 
> > I'm asking this just because I don't have time now to investigate
> > this by my own :-).
> 
> What do you ask, exactly? 

I was wondering if it was really possible to go deeper into the syntax tree
and recreate the function body out of the <pat> -> <expr> pieces.

Since you implemented your "iterate"
> extension, I suppose that you know how to use Camlp4. 

It was a direct analog of the Pascal 'repeat' example. :-) I didn't go
any further that time.

> What is the
> difficulty to implement your "fold"?

Better knowledge of camlp4 :-). From your remark I understand that it's
possible. Thank you!

Alexander
-------------------
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:[~2002-10-17 17:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-17 16:08 [Caml-list] [camlp4] compiling against Pcaml module Stefano Zacchiroli
2002-10-17 16:21 ` Daniel de Rauglaudre
2002-10-17 16:23   ` Daniel de Rauglaudre
2002-10-17 16:22 ` Samuel Lacas
2002-10-17 16:26   ` Daniel de Rauglaudre
2002-10-17 16:28     ` [Caml-list] a quick question on camlp4 Alexander V.Voinov
2002-10-17 16:55       ` Daniel de Rauglaudre
2002-10-17 17:07         ` Alexander V.Voinov [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=20021017.100735.41641743.avv@quasar.ipa.nw.ru \
    --to=avv@quasar.ipa.nw.ru \
    --cc=caml-list@inria.fr \
    --cc=daniel.de_rauglaudre@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;
as well as URLs for NNTP newsgroup(s).