As I wrote to the list earlier, I have noticed that the Camlp4MacroParser in 3.10.0+beta has an unfortunate problem - when processing an "IFDEF" (or "IFNDEF") directive, it will execute the "DEFINE"s in _both_ branches, regardless of whether the test is true or not (this was caused by the fact that the DEFINE directives would be executed eagerly at parse-time). Attached is a corrected and improved version of the Camlp4MacroParser: - Fixes the above problem; now the execution of the "DEFINE" directives inside IFDEF/IFNDEF is correct. - Adds support for "local" definitions DEFINE = IN This is particularly useful for things like DEFINE body = ... IN IFDEF DEBUG let result = body in print_debug result; result ELSE body - Adds an ability to omit the "ELSE" part of the IFDEF/IFNDEF expressions (the "ELSE" branch is then taken to default to unit expression "()"). - Adds an ability to use the macro argument as a pattern (provided the argument is a sufficiently simple expression) - Adds a special macro "NOTHING" that can be used to "wipe out" unneeded function arguments. This is useful to be able to generate functions of different arity using the same macro. The improved Camlp4MacroParser.ml is attached. Aleksey