English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
camlp4 question: Mixing a printer and Ast.fold
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-03-21 (15:51)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] camlp4 question: Mixing a printer and Ast.fold
On Fri, Mar 21, 2008 at 03:36:11PM +0000, Jeremy Yallop wrote:
> Richard Jones wrote:
> >I cannot for the life of me work out how to get this to compile.  I've
> >tried about a dozen different variations of the module names, 'open',
> >'include' etc. and got a dozen different errors.
> Here's another variation that compiles and seems to work.  I changed the 
> following:
>    * the argument type to Make from "Syntax" to "Camlp4Syntax"
>    * the register functor from "Printer" to "OCamlPrinter"
>    * the accumulated value in "expr" from "str" to "singular".

Brilliant, that works, thanks!

>     | <:expr@loc< f $str:singular$ >> ->
>       let t = singular :: t in

The above was just a typo when I was simplifying the program ...


Richard Jones
Red Hat