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
[Caml-list] -i option to compiler
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Monniaux <David.Monniaux@e...>
Subject: Re: [Caml-list] -i option to compiler
On 9 Jan 2002, Ian Zimmerman wrote:

> kronstadt:~$ ocamlc -i > foo.mli
> I/O error: foo.cmi: No such file or directory

This one is classical.

When you use > foo.mli, the shell creates foo.mli BEFORE running ocamlc.
So when ocamlc sees that there is a .mli file, it looks for the
corresponding .cmi and complains loudly that it does not exist.

The solution is to do
ocamlc -i > foo.mli.tmp
mv foo.mli.fmp

I guess that the compiler should accept a -output-mli option or something
similar, to avoid the above kludge.

David Monniaux  
Laboratoire d'informatique de l'École Normale Supérieure,
Paris, France

Bug reports:  FAQ:
To unsubscribe, mail  Archives: