Hi, Le mercredi 07 avril 2010 à 15:05 -0400, Jacques Le Normand a écrit : > Dear List, > I'm writing a camlp4 syntax extension and I'd like to write > > <:expr< let ( >>= ) = Bar.( >>= ) in 5 >> > > but camlp4 complains: > > While expanding quotation "expr" in a position of "expr": > Parse error: ")" or [ipatt] expected after "(" (in [ipatt]) > > yet it seems to be valid revised syntax. Does anyone have any ideas?
It is because the ">>" of the ">>=" operator is detected as the end of the camlp4 quotation. You can try something like that: let operator = ">>=" in <:expr< let ($lid:operator$) = Bar.($lid:operator$) in 5 >> Cheers, Jérémie _______________________________________________ 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