Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] interface printing without generating object code?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: jeanmarc.eber@l...
Subject: Re: [Caml-list] interface printing without generating object code?
Quoting Chris Hecker <checker@d6.com>: 
 
>  
> >What do you want that's not 
> >    ocamlc -i -c foo.ml -o /dev/null 
> >? 
>  
> I tried that (well, the windows version with NUL) and it didn't work.  
> It  
> still generated both a cmi and a cmo.  Doesn't yours generate a cmi at  
> least, even on unix?  I want no output except stdout. 
>  
 
 
>>What do you want that's not 
>>    ocamlc -i -c foo.ml -o /dev/null 
>>? 
 
>I tried that (well, the windows version with NUL) and it didn't work.  It 
>still generated both a cmi and a cmo.  Doesn't yours generate a cmi at 
>least, even on unix?  I want no output except stdout. 
 
Indeed, something not too far away from what you want exists today in the 
compiler; look into /utils/clflags.ml: 
 
let dont_write_files = ref false        (* set to true under ocamldoc *) 
 
This flag is used for avoiding the production of a cmi file (look 
at file typing/typemod.ml: 
 
      if not !Clflags.dont_write_files then 
        Env.save_signature sg modulename (prefixname ^ ".cmi"); 
 
when the module is used in conjunction with ocamldoc. 
 
My guess: 
 
It should be enough to 
-make this flag "accessible" by a compiler switch, and 
-to add a similar test in 2 or 3 places, for avoiding any file production 
by the compiler. 
 
I argue also in favor of such an enhancement. 
 
Jean-Marc Eber 
LexiFi 
 
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners