Browse thread
Importing module signatures ?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Chris King <colanderman@g...> |
| Subject: | Re: [Caml-list] Importing module signatures ? |
On 10/4/07, David Teller <David.Teller@univ-orleans.fr> 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 foo.ml and foo.mli file is exactly this: module Foo: sig <contents of foo.mli> end = struct <contents of foo.ml> end 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 [1] http://rainbow.mimuw.edu.pl/~pw189451/ocaml/extsig.patch [2] http://caml.inria.fr/pub/ml-archives/caml-list/2006/12/c7461312202053f2213a9bb33206fcb8.en.html