English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Module abbreviation
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-12-18 (06:55)
From: Basile STARYNKEVITCH <basile@s...>
Subject: Re: [Caml-list] Module abbreviation
Romain Bardou wrote:
> Basile STARYNKEVITCH wrote:
>> Romain Bardou wrote:
>>> Hello, dear Caml-list,
>>> I have a file ast.mli. It has no .ml implementation as it contains only
>>> type definitions.
>> Then you should name that file ast.ml. Last time I tested (more than a
>> year ago) n ast.ml file without corresponding ast.mli file is handled as
>> if ast.mli was the output of ocamlc -i ast.ml.
>> Regards
> Yes, this seems to be the easiest way. It's too bad that this implies
> having a .cmo to link against just for some type definitions, though.

Why is that bad?  The *.cm[oi] files are the only ones containing the processed type & module information, and we 
obviously don't want ocamlc to reparse ast.mli each time it is needed.


Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***