caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* tools/objinfo and modules without implementations
@ 2007-05-21 21:47 Richard Jones
  0 siblings, 0 replies; only message in thread
From: Richard Jones @ 2007-05-21 21:47 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 1381 bytes --]

The Calendar library from http://www.lri.fr/~signoles/prog/calendar/doc/
contains a module (Period) which has an interface (period.mli) but no
implementation.

There's apparently nothing wrong with that, but the output of
tools/objinfo for calendar.cma shows only the list of modules which
have implementations.  For example:

  Unit name: Time
  Interfaces imported:
        71f888453b0f26895819460a72f07493        Pervasives
        1876ce678cfa5a1961fac21850f71efd        Unix
        1b657b86bb0e7ba36acf02910897b2eb        Time
        8d84727c6f398e1a8b710d8161e26479        Time_Zone
        d99e051c4c63bb80cd2586ea99584429        Period
  Uses unsafe features: no

"Period" is not shown as a separate module (ie. there is no "Unit
name: Period") in the output.

The problem for me is I'd like to determine which modules are provided
by a library, and which modules a library depends upon.  I can't tell
that from objinfo because of modules like Period.

I had a look at the implementation, tools/objinfo.ml and the
definition of compilation_unit and library in bytecomp/emitcode.mli,
and I can't really see how even the compiler knows about these types
of modules.  Why doesn't it try and fail to link to Period when
loading calendar.cma?

Rich.

PS. Background here:
https://www.redhat.com/archives/fedora-devel-list/2007-May/thread.html#01234

-- 
Richard Jones
Red Hat

[-- Attachment #2: calendar-objinfo.txt --]
[-- Type: text/plain, Size: 1986 bytes --]

File /usr/lib64/ocaml/calendar/calendar.cma
  Force custom: no
  Extra C object files:
  Extra C options:
  Unit name: Time_Zone
  Interfaces imported:
	71f888453b0f26895819460a72f07493	Pervasives
	1876ce678cfa5a1961fac21850f71efd	Unix
	8d84727c6f398e1a8b710d8161e26479	Time_Zone
  Uses unsafe features: no
  Unit name: Time
  Interfaces imported:
	71f888453b0f26895819460a72f07493	Pervasives
	1876ce678cfa5a1961fac21850f71efd	Unix
	1b657b86bb0e7ba36acf02910897b2eb	Time
	8d84727c6f398e1a8b710d8161e26479	Time_Zone
	d99e051c4c63bb80cd2586ea99584429	Period
  Uses unsafe features: no
  Unit name: Date
  Interfaces imported:
	a904b798dd9665c2d3635636d293403c	Array
	0b9d8d46ec722919ef4a2b4f7576d8f1	Date
	71f888453b0f26895819460a72f07493	Pervasives
	1876ce678cfa5a1961fac21850f71efd	Unix
	8d84727c6f398e1a8b710d8161e26479	Time_Zone
	d99e051c4c63bb80cd2586ea99584429	Period
  Uses unsafe features: YES
  Primitives declared in this module:
	%identity
	%identity
	%identity
	%identity
  Unit name: Calendar
  Interfaces imported:
	514a56b1c3e9c1e5139e81e0e2736ab8	Calendar
	0b9d8d46ec722919ef4a2b4f7576d8f1	Date
	71f888453b0f26895819460a72f07493	Pervasives
	1876ce678cfa5a1961fac21850f71efd	Unix
	1b657b86bb0e7ba36acf02910897b2eb	Time
	8d84727c6f398e1a8b710d8161e26479	Time_Zone
	d99e051c4c63bb80cd2586ea99584429	Period
  Uses unsafe features: no
  Unit name: Printer
  Interfaces imported:
	514a56b1c3e9c1e5139e81e0e2736ab8	Calendar
	45f466ce46f213dae41be77dd8505f5f	Buffer
	0b9d8d46ec722919ef4a2b4f7576d8f1	Date
	71f888453b0f26895819460a72f07493	Pervasives
	fec8292bb1a02d2c7b8b4ba7b83a7d8b	String
	1876ce678cfa5a1961fac21850f71efd	Unix
	de9afc53dc6db958fdf5927dc86df9aa	Printer
	5a0e3217fc356bd18f60bff31861dfd3	List
	1b657b86bb0e7ba36acf02910897b2eb	Time
	8d84727c6f398e1a8b710d8161e26479	Time_Zone
	67f81fa527012cf0f70f6f6a24f07417	Format
	8a11c5ef144a995903cc9e1bac5e353c	Str
	d99e051c4c63bb80cd2586ea99584429	Period
	27baa9469b2986a6ccbba3e85275ecf1	Lazy
  Uses unsafe features: no

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-05-21 21:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-21 21:47 tools/objinfo and modules without implementations Richard Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).