Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
camlp4: From AST to shortcuts
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-10-10 (13:00)
From: Joel Reymont <joelr1@g...>
Subject: Re: [Caml-list] camlp4: From AST to shortcuts

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/ 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?

	Thanks, Joel