[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: foo.inferred.mli and lazy typists



On 25 Aug 2011, at 11:02, Richard Mortier wrote:

> 
> On 25 Aug 2011, at 10:18, Anil Madhavapeddy wrote:
>> How does it fail? It certainly shouldn't.  If you open modules, they will 
>> appear in full in the inferred interface, but you just delete that from the 
>> MLI.
> 
> : mort@greyjay:openflow$; pwd
> /Users/mort/research/mirage/src/mirage.git/lib/openflow
> : mort@greyjay:openflow$; ocamlbuild ofpacket.inferred.mli
> + /usr/local/bin/ocamlc.opt -i ofpacket.ml > ofpacket.inferred.mli
> File "ofpacket.ml", line 17, characters 0-8:
> Error: Unbound module Lwt
> Command exited with code 2.
> 

Aha! You can only run ocamlbuild from the lib/ directory, and not 
subdirectories (since lib/myocamlbuild.ml has all the custom Mirage rules).

If I run your command line as:

$ cd mirage/lib
$ ocamlbuild openflow/ofpacket.inferred.mli
Finished, 0 targets (0 cached) in 00:00:00.
+ /usr/local/bin/ocamlc.opt -I openflow -I std -i -pp 'camlp4o -I 
../../../syntax/_build pa_lwt.cma pa_bitstring.cma ' openflow/ofpacket.ml > 
openflow/ofpacket.inferred.mli
File "openflow/ofpacket.ml", line 171, characters 4-14:
Warning 11: this match case is unused.
Finished, 22 targets (20 cached) in 00:00:02.

I've added this point to NOTES.md as it's not obvious...

Anil


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.