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 nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 08990BB83 for ; Mon, 14 Aug 2006 17:21:28 +0200 (CEST) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k7EFLRmv004691 for ; Mon, 14 Aug 2006 17:21:27 +0200 Received: by nf-out-0910.google.com with SMTP id l37so105332nfc for ; Mon, 14 Aug 2006 08:21:27 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=J5csn0w4Q714lxmKbr7RRnU5yR+ah9ZNjEqgumxP3Z5fuRyegppq6cajheKZsuBBT6n4zj0No6inPcstqJIuJMaAOlnOUl/lKyv3ElzbqssrjYmdZUerCbCs2NA6ts/ctrMmbGn0HcE8D6JMISpfBiuzCpgWlug4TgYj1oo+KZ4= Received: by 10.49.21.8 with SMTP id y8mr1355332nfi; Mon, 14 Aug 2006 08:21:25 -0700 (PDT) Received: by 10.49.32.6 with HTTP; Mon, 14 Aug 2006 08:21:25 -0700 (PDT) Message-ID: Date: Mon, 14 Aug 2006 17:21:25 +0200 From: Tom To: caml-list@yquem.inria.fr Subject: Dynamic loading of bytecode MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_82491_21475230.1155568885951" X-j-chkmail-Score: MSGID : 44E094F7.000 on nez-perce : j-chkmail score : X : 0/20 1 X-Miltered: at nez-perce with ID 44E094F7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; bytecode:01 hiearchy:01 toploop:01 bytecode:01 ocamlc:01 ocamlc:01 toploop:01 hiearchy:01 compile:01 compile:01 simplify:01 simplify:01 modules:02 modules:02 dependent:02 X-Attachments: cset="UTF-8" cset="UTF-8" X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=HTML_20_30,HTML_MESSAGE, RCVD_BY_IP autolearn=disabled version=3.0.3 ------=_Part_82491_21475230.1155568885951 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline There is a really stupid question I want to ask, I have been searching online for some days now and couldn't get it answered... How can you load the whole module hiearchy (many modules, dependent on one another) with a single command in toploop? Say I have files a.ml: let f x = x - 1 and b.ml: let g x y = x + f y - f x and I compile them into bytecode ocamlc -c a.ml ocamlc -c b.ml and then I want to be able to load them into the toploop so that I could access both modules A and B: # let simplify x = B.g x - A.f x How do I do that? ------=_Part_82491_21475230.1155568885951 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline There is a really stupid question I want to ask, I have been searching online for some days now and couldn't get it answered...

How can you load the whole module hiearchy (many modules, dependent on one another) with a single command in toploop?

Say I have files a.ml:

  let f x = x - 1

and b.ml:

  let g x y = x + f y - f x


and I compile them into bytecode

  ocamlc -c a.ml
  ocamlc -c b.ml

and then I want to be able to load them into the toploop so that I could access both modules A and B:

  # let simplify x = B.g x - A.f x


How do I do that?
------=_Part_82491_21475230.1155568885951--