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 PAA03920; Mon, 29 Apr 2002 15:33:33 +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 PAA03916 for ; Mon, 29 Apr 2002 15:33:32 +0200 (MET DST) Received: from kiefer.ai.univie.ac.at (kiefer.ai.univie.ac.at [131.130.174.157]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g3TDXUD24817 for ; Mon, 29 Apr 2002 15:33:30 +0200 (MET DST) Received: (from markus@localhost) by kiefer.ai.univie.ac.at (8.9.3/8.9.3/Debian 8.9.3-21) id PAA28044; Mon, 29 Apr 2002 15:33:23 +0200 Date: Mon, 29 Apr 2002 15:33:23 +0200 From: Markus Mottl To: "Krishnaswami, Neel" Cc: caml-list@inria.fr Subject: Re: [Caml-list] Polymorphic Variants and Number Parameterized Typ es Message-ID: <20020429133322.GE25953@kiefer.ai.univie.ac.at> Mail-Followup-To: "Krishnaswami, Neel" , caml-list@inria.fr References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.26i Organization: Austrian Research Institute for Artificial Intelligence Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, 29 Apr 2002, Krishnaswami, Neel wrote: > There's no recursion in the module system because that would break > the termination guarantee. We currently don't have this guarantee anyway: --------------------------------------------------------------------------- module type I = sig module type A module F : functor(X : sig module type A = A module F : functor(X : A) -> sig end end) -> sig end end module type J = sig module type A = I module F : functor(X : I) -> sig end end (* Try to check J <= I *) module Loop(X : J) = (X : I) --------------------------------------------------------------------------- > If you think of modules as records, and functors as lambda abstractions, > you can see that the module system defines a simply-typed lambda > calculus. As you've noticed with C++, adding recursion to it would > mean you can write nonterminating module expressions. (All this is > wonderfully clearly explained in the paper, "A modular module system".) I'd really like to see Claudio Russo's generalizations of the ML-module system in OCaml. Especially first class modules would come really handy to me in some situations. Any news on this front? Regards, Markus Mottl -- Markus Mottl markus@oefai.at Austrian Research Institute for Artificial Intelligence http://www.oefai.at/~markus ------------------- 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