From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA25882; Thu, 5 Aug 2004 13:23:11 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA24996 for ; Thu, 5 Aug 2004 13:23:10 +0200 (MET DST) Received: from tx1.oucs.ox.ac.uk (tx1.oucs.ox.ac.uk [129.67.1.167]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i75BN9mL018611 for ; Thu, 5 Aug 2004 13:23:09 +0200 Received: from scan1.oucs.ox.ac.uk ([129.67.1.166] helo=localhost) by tx1.oucs.ox.ac.uk with esmtp (Exim 4.24) id 1BsgKz-0006Ny-IJ for caml-list@pauillac.inria.fr; Thu, 05 Aug 2004 12:23:09 +0100 Received: from rx1.oucs.ox.ac.uk ([129.67.1.165]) by localhost (scan1.oucs.ox.ac.uk [129.67.1.166]) (amavisd-new, port 25) with ESMTP id 24180-04 for ; Thu, 5 Aug 2004 12:23:09 +0100 (BST) Received: from smtp2.herald.ox.ac.uk ([163.1.0.235]) by rx1.oucs.ox.ac.uk with esmtp (Exim 4.24) id 1BsgKz-0006Ns-4z for caml-list@pauillac.inria.fr; Thu, 05 Aug 2004 12:23:09 +0100 Received: from dhcpa9.comlab.ox.ac.uk ([163.1.27.209]) by smtp2.herald.ox.ac.uk with esmtp (Exim 3.35 #1) id 1BsgKz-00012T-3n for caml-list@pauillac.inria.fr; Thu, 05 Aug 2004 12:23:09 +0100 Mime-Version: 1.0 (Apple Message framework v618) In-Reply-To: References: <20040804160247.GA13965@annexia.org> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Ross Duncan Subject: Re: [Caml-list] Conditional Modules Date: Thu, 5 Aug 2004 12:23:07 +0100 To: caml-list@pauillac.inria.fr X-Mailer: Apple Mail (2.618) X-Miltered: at nez-perce with ID 4112189D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 plea:01 prevost:01 runtime:01 runtime:01 sig:01 modules:02 modules:02 module:03 module:03 typing:03 types:03 stuff:05 stuff:05 seems:05 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Thanks to everyone who replied to my plea for help. Unfortunately I don't believe that any of the very good suggestions I received will solve my problem. As John Prevost said: > (And that's the real reason > that you can't do conditionals to choose one of several modules: you > can't do conditionals at runtime on types!) If I had specified my problem a little more carefully I might have said module type T = sig type t (* some other stuff involving t *) end module M1 : T = .... module M2 : T = .... (* and now choose at runtime between M1 and M2 *) It seems that all the *other stuff* can be chosen at runtime with various degrees of elegance but the type t is the big spanner which stops the machine. So I guess my request for help should now become a feature request for the language! Is this at all compatible with static typing? Thanks again for all the suggestions. Ross ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners