From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 643E7BC37 for ; Thu, 12 Nov 2009 13:16:25 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmYCAMaL+0pV2gB5h2dsb2JhbACEc5cnAQEBCgsIBxWuaJB4gTCCOFQEiCc X-IronPort-AV: E=Sophos;i="4.44,727,1249250400"; d="scan'208";a="39984877" Received: from emailfrontal2.citycable.ch ([85.218.0.121]) by mail1-smtp-roc.national.inria.fr with SMTP; 12 Nov 2009 13:16:09 +0100 Received: from [192.168.0.10] (unknown [85.218.92.99]) (Authenticated sender: guillaume.yziquel@citycable.ch) by emailfrontal2.citycable.ch (Postfix) with ESMTPA id 2558BB1043C; Thu, 12 Nov 2009 13:16:04 +0100 (CET) Message-ID: <4AFBFC9E.8010802@citycable.ch> Date: Thu, 12 Nov 2009 13:16:30 +0100 From: Guillaume Yziquel Reply-To: guillaume.yziquel@citycable.ch User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707) MIME-Version: 1.0 To: caml-list@inria.fr Subject: Including code from a .cm[ox] into another .cm[ox] Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; guillaume:01 guillaume:01 struct:01 cmo:01 cmo:01 toplevel:01 submodule:01 compile:01 module:03 module:03 let:03 loading:05 loading:05 load:08 load:08 Hello. Imagine I have a file named a.ml containing > module C = struct > include B > end and a file named b.ml containing the code > let f x = x + 1 When I compile everything to .cmo files, I cannot load a.cmo from the toplevel without loading b.cmo beforehand. Is there a way to make the 'include B' statement to include the code of the B module in the C submodule directly so that it is not required to load the b.cmo file before loading the a.cmo file? That would be extremely useful to me... All the best, -- Guillaume Yziquel http://yziquel.homelinux.org/