Version française
Home     About     Download     Resources     Contact us    
Browse thread
Unbound type constructor
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] Unbound type constructor
On Wed, 2007-04-25 at 13:21 -0700, snowfall wrote:
> Hi.
> 
> I am developing a compiler for a language. I have done the parser, the lexer
> and the ast. But when I execute the command ocamlc -c parser.mli is shown
> the error "unbound type constructor abacus_ast.progr".

> 
> and in the parser I put:
> % type < Abacus_ast.progr > programa
> 
> Can anyone tell me what I am doing wrong? 

yep .. you have to do

ocamlc -c abacus_ast.mli

first. If A depends on B, you must compile B before you
compile A. This applies to all files whether ml or mli
files.  x.ml depends on x.mli if it exists.

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net