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
Importing module signatures ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-10-04 (14:09)
From: Chris King <colanderman@g...>
Subject: Re: [Caml-list] Importing module signatures ?
On 10/4/07, David Teller <> wrote:
> It seems that String is the name of the module structure itself rather
> than its signature. But what is the name of the signature ?

The relationship between the and foo.mli file is exactly this:

module Foo: sig
  <contents of foo.mli>
end = struct
  <contents of>

i.e., the .mli is not given a name.  There is a patch to support what
you want to do here [1], using a new statement "import" to include the
signature from an .mli file... it's one of a handful [2] [3] of
patches from Piotr Wieczorek that I'd love to see make it into the
official tree, but I haven't heard from the O'Caml dev team one way or
the other.

- Chris