| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Camlp4 tricks

Page history last edited by PBworks 17 years, 9 months ago

This is a place to share tips and tricks about Camlp4.

 

AST to string conversion

 

This message from Daniel de Rauglaudre on caml-list explains how to convert a syntax node into a string, like pr_o.cmo or pr_r.cmo do.

 

Basically, pretty-printing an expr e goes like this:

Pcaml.string_of Pcaml.pr_expr e

The Pr_o (or Pr_r) module has to be linked in.

Comments (0)

You don't have permission to comment on this page.