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 KAA22412; Fri, 8 Feb 2002 10:24:38 +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 KAA17391 for ; Fri, 8 Feb 2002 10:24:37 +0100 (MET) Received: from fichte.ai.univie.ac.at (fichte.ai.univie.ac.at [131.130.174.156]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g189OVD22977 for ; Fri, 8 Feb 2002 10:24:31 +0100 (MET) Received: (from markus@localhost) by fichte.ai.univie.ac.at (8.9.3/8.9.3/Debian 8.9.3-21) id KAA18761; Fri, 8 Feb 2002 10:24:20 +0100 Date: Fri, 8 Feb 2002 10:24:20 +0100 From: Markus Mottl To: Jacques Garrigue Cc: frisch@clipper.ens.fr, caml-list@inria.fr Subject: Re: [Caml-list] Type variables (was: Odd Type Checking Problem) Message-ID: <20020208092420.GA18596@fichte.ai.univie.ac.at> Mail-Followup-To: Jacques Garrigue , frisch@clipper.ens.fr, caml-list@inria.fr References: <20020207122525.GB22578@fichte.ai.univie.ac.at> <20020208103318P.garrigue@kurims.kyoto-u.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020208103318P.garrigue@kurims.kyoto-u.ac.jp> User-Agent: Mutt/1.3.26i Organization: Austrian Research Institute for Artificial Intelligence Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Fri, 08 Feb 2002, Jacques Garrigue wrote: > > Are there any plans to lift this restriction? This would e.g. allow using > > polymorphic types in functor arguments that expect monomorphic instances, > > because the free variable could be bound in an outer scope. For instance, > > one could create "polymorphic" sets of elements with the already existing > > Set-implementation. > > Interesting point. It looks like it could work locally. Notice however > that you wouldn't be able to to return such a set from the scope of > the let module. So basically you've not not earned a lot: just the > capacity to hide the fact you're calling a functor inside your > function. Currently you would have to make your function into a functor. True, but one can return closures that operate on the set. When they are recursive, this would allow just about anything. So the functor only has to be applied once. Hm, with some syntactic sugaring, this might give us something similar to first-class modules, wouldn't it? Regards, Markus Mottl -- Markus Mottl markus@oefai.at Austrian Research Institute for Artificial Intelligence http://www.oefai.at/~markus ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr