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 DAA04077; Mon, 17 Mar 2003 03:21:06 +0100 (MET) 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 DAA27930 for ; Mon, 17 Mar 2003 03:21:04 +0100 (MET) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h2H2L2X07700 for ; Mon, 17 Mar 2003 03:21:03 +0100 (MET) Received: from localhost (suiren.kurims.kyoto-u.ac.jp [130.54.16.25]) by kurims.kurims.kyoto-u.ac.jp (8.9.3/3.7W) with ESMTP id LAA06296; Mon, 17 Mar 2003 11:20:55 +0900 (JST) To: brogoff@speakeasy.net Cc: caml-list@pauillac.inria.fr Subject: Re: Module recursion (Was Re: [Caml-list] Re: Haskell-like syntax) In-Reply-To: References: <4.3.2.7.2.20030315213334.037caf08@localhost> X-Mailer: Mew version 1.94.2 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20030317112055C.garrigue@kurims.kyoto-u.ac.jp> Date: Mon, 17 Mar 2003 11:20:55 +0900 From: Jacques Garrigue X-Dispatcher: imput version 20000228(IM140) X-Spam: no; 0.00; jacques:01 recursion:01 caml-list:01 haskell-like:01 brogoff:01 3.05:01 failwith:01 prerr:01 endline:01 mutable:01 speakeasy:01 garrigue:01 polymorphic:01 syntax:02 module:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk From: brogoff@speakeasy.net > Of the two issues you bring up, I think having the ability to have mutually > recursive functions across module boundaries is *by far* more important than > the ability to spread types across module boundaries. We can sort of do it > now, with references, but we have the same problem as with theworkaround I > mentioned for "where": reduced polymorphism. Not so since 3.05: you have to be explicit, but you can define polymorphic mutable values. a.ml: type id = { mutable id: 'a. 'a -> 'a } let id = { id = fun _ -> failwith "A.id not defined yet" } ... id.id 1, id.id true b.ml: let () = A.id.A.id <- (fun x -> prerr_endline "Got you!"; x) Hope this helps, Jacques ------------------- 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