On Mon, 19 Jan 2009 17:41:35 +0100, blue storm wrote:
> 
> On 1/19/09, Yoann Padioleau <pada...@wanadoo.fr> wrote:
> > What we want is really give code like
> >
> > let my_analysis program =
> >  analyze_all_expressions program (fun expr ->
> >    match expr with
> >    | FunCall (e, es) -> do_something()
> >    | _ -> <find_a_way_to_recurse_for_all_the_other_cases>
> >  )
> >
> > The problem is how to write analyze_all_expressions
> > and find_a_way_to_recurse_for_all_the_other_cases.
> 
> You should have a look at the Camlp4 "metaprogramming" facilities :
> http://brion.inria.fr/gallium/index.php/Camlp4MapGenerator

You may also be interested in the paper "Code reuse through
polymorphic variants" by Jacques Garrigue:
http://www.math.nagoya-u.ac.jp/~garrigue/papers/fose2000.html

Regards,
ChriS

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to