[wg-camlp4] Meta Programming from the view of the implementaion

Alain Frisch alain at frisch.fr
Wed Jan 30 17:07:48 GMT 2013


On 01/30/2013 05:13 PM, Leo White wrote:
>> Do you really mean using a single > as the closing delimiter in the
>> first case?
>
> You're right that should really be ">>".

Same problem:

let ( >> ) = ( lsr ) in
<< foo >> 2 >>

>> >> is also a valid binary operator, by the way.
>>
>
> Yes, but it is also listed as a keyword, so it is probably fine to
> appropriate it.

The manual says:

""
Note that the following identifiers are keywords of the Camlp4 
extensions and should be avoided for compatibility reasons.

     parser    <<    <:    >>    $     $$    $:
""

 >> and << are really not keywords of OCaml, and I wouldn't be surprised 
they are actually used as operators.  I prefer breaking compatibility 
with camlp4 than with OCaml.


-- Alain


More information about the wg-camlp4 mailing list