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 EAA06833; Tue, 7 Sep 2004 04:29:04 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id EAA04453 for ; Tue, 7 Sep 2004 04:29:02 +0200 (MET DST) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i872T0VN016089 for ; Tue, 7 Sep 2004 04:29:01 +0200 Received: from localhost (suiren.kurims.kyoto-u.ac.jp [130.54.16.25]) by kurims.kurims.kyoto-u.ac.jp (8.9.3p2-20030924/3.7W) with ESMTP id LAA13971; Tue, 7 Sep 2004 11:28:56 +0900 (JST) Date: Tue, 07 Sep 2004 11:28:56 +0900 (JST) Message-Id: <20040907.112856.50024508.garrigue@kurims.kyoto-u.ac.jp> To: edgin@slingshot.co.nz Cc: caml-list@inria.fr Subject: Re: [Caml-list] Circular module dependencies From: Jacques GARRIGUE In-Reply-To: <200409070917.18022.edgin@slingshot.co.nz> References: <200409070917.18022.edgin@slingshot.co.nz> X-Mailer: Mew version 4.0.64 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 413D1CEC.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 dependencies:01 jacques:01 dependencies:01 acyclic:01 ml's:01 cyclic:01 jacques:01 wwwfun:01 compiler:01 ocaml:01 ocaml:01 garrigue:01 garrigue:01 kyoto:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk From: Tony Edgin > Recently, there was a thread which talked about how difficult module > dependencies were to resolve for linking in Ocaml. I'm guessing this is > because of cycles in the dependency graph. > > My thought is that maybe Ocaml shouldn't allow this to happen. Wouldn't > cyclical module dependencies be a symptom of bad design? Bingo. Ocaml does not allow it. It just happens that you can cheat the compiler into accepting two different acyclic dependency graphs: one for the types (compilation order of the .mli's) and one for the values (compilation order of the .ml's). This was never intended, but there is no specific reason to go to great length to defeat that trick, as it is still safe. At least that's my take on the question. > If a cyclic dependency occurs I can think of two ways of removing. Indeed, this is the reasonable approach. --------------------------------------------------------------------------- Jacques Garrigue Kyoto University garrigue at kurims.kyoto-u.ac.jp JG ------------------- 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