caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* camlp4 & free variables
@ 2006-07-19 23:27 Christophe TROESTLER
  2006-07-20  8:28 ` [Caml-list] " Nicolas Pouillard
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Christophe TROESTLER @ 2006-07-19 23:27 UTC (permalink / raw)
  To: O'Caml Mailing List

Hi,

Is it possible to write a camlp4 syntax extension that "extract" the
free variables of an expression?  As an example, say I write

  FUNCTION(let z = x + 2 in x + 2 * y * x * z)

and it becomes

  fun ~x ~y -> let z = x + 2 in x + 2 * y * x * z

(of course I'd like good error reporting in case of an error in the
expression).  If it is not possible, what is the best way to build a
tool that does that (short of writing a parser for the OCaml language)?

Thanks,
ChriS


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-07-21 18:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-19 23:27 camlp4 & free variables Christophe TROESTLER
2006-07-20  8:28 ` [Caml-list] " Nicolas Pouillard
     [not found]   ` <20060720.163930.91910937.Christophe.Troestler@umh.ac.be>
2006-07-21 12:01     ` Nicolas Pouillard
2006-07-21 18:16       ` Martin Jambon
2006-07-20  9:25 ` Guido Kollerie
2006-07-20  9:25 ` Guido Kollerie
2006-07-20 10:25   ` Accidentally bounced my email [Was: [Caml-list] camlp4 & free variables] Guido Kollerie
2006-07-20  9:25 ` [Caml-list] camlp4 & free variables Guido Kollerie

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