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
AST transformation and scrapping boilerplate code
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-04-30 (13:06)
From: Joel Reymont <joelr1@g...>
Subject: Re: [Caml-list] AST transformation and scrapping boilerplate code

On Apr 30, 2007, at 1:58 PM, Nicolas Pouillard wrote:

> Use camlp4of (since INCLUDE is provided by camlp4 macros).
> Also add -filter trash to the camlp4 options (after map and fold), in
> order to remove the Camlp4Trash module.

Including the AST module worked and I'm almost there.

+ ocamlfind ocamlc -package ounit -c -I +camlp4 -pp 'camlp4of -filter  
map -filter fold -filter trash ' -o easy_strip.cmo
File "ghost-location", line 1, characters 0-0:
Unbound type constructor var_decl

This is surprising since the AST looks like this, i.e. var_decl is  
part of it.

What is the explanation for this and how should I fix it?

and statement =
     | `VarDecls of var_decl list


and var_decl =
     | `VarDecl of id * ty * expr

	Thanks, Joel