Browse thread
[Caml-list] Again on pattern matching and strings
-
Alessandro Baretta
- Stefano Zacchiroli
- Alexander V.Voinov
- Christopher Quinn
- Alessandro Baretta
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Alessandro Baretta <alex@b...> |
| Subject: | Re: [Caml-list] Again on pattern matching and strings |
Olivier Andrieu wrote: > Alessandro Baretta [Thursday 24 October 2002] : > > I write this message because I would like to know what kind > > of complications would need to be added to the compiler to > > make the above trick work. > > None ! You can do it with camlp4 ! Unless I'm mistaken, what's > described there : > <http://caml.inria.fr/camlp4/tutorial/tutorial007.html#toc49> seems > to apply to your case. Ah, woe is me! I put ashes on my head. I do not understand the example, but yes, what I am asking for is essentially, a substitution of constant expressions for their alias in the syntax tree of the program. So yes: CamlP4 can do it. Since I don't want to reinvent the wheel, has anyone written--and documented for the syntax laymen--such an extension? Alex ------------------- 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