caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Nicolas Pouillard" <nicolas.pouillard@inria.fr>
To: joelr1 <joelr1@gmail.com>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] camlp4: From AST to shortcuts
Date: Thu, 11 Oct 2007 15:05:25 +0200	[thread overview]
Message-ID: <1192107803-sup-2096@ausone.inria.fr> (raw)
In-Reply-To: <1BF51861-4230-498D-B4DF-20F571A68741@gmail.com>

Excerpts from joelr1's message of Wed Oct 10 15:00:54 +0200 2007:
> 
> On Oct 10, 2007, at 1:36 PM, Nicolas Pouillard wrote:
> 
> > With the pretty printer.
> > ...
> > let _loc = ghost;;
> > Format.eprintf "<:ctyp< %a >>@." pp#ctyp (Ast.TyId (_loc, Ast.IdLid  
> > (_loc, "int")));;
> 
> That doesn't quite work since I have to know to use a ctyp. I was  
> wondering if there was a way to figure out the shortcut without  
> knowing about ctyp beforehand.
> 
> Then again, I looked at Camlp4/Camlp4Ast.partial.ml and, conveniently  
> enough, TyId is located under ctyp whereas CrIn (class initializer;  
> what's the "r" in Cr?) is under class_str_item.
> 
> Can it be THAT simple?

Of    course!   The   convention   for   quotations   given   by   camlp4   is
<:type_name<...>>,  <:expr<...>>  is  for  Ast.expr, <:class_str_item<...>> is
for Ast.class_str_item...

-- 
Nicolas Pouillard aka Ertai


      reply	other threads:[~2007-10-11 13:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-09 21:41 Joel Reymont
2007-10-10 12:36 ` [Caml-list] " Nicolas Pouillard
2007-10-10 13:00   ` Joel Reymont
2007-10-11 13:05     ` Nicolas Pouillard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1192107803-sup-2096@ausone.inria.fr \
    --to=nicolas.pouillard@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=joelr1@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).