From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA27231 for caml-redistribution; Tue, 19 Jan 1999 17:55:51 +0100 (MET) 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 JAA07091 for ; Tue, 19 Jan 1999 09:49:43 +0100 (MET) Received: from irritatie.cs.kun.nl (irritatie.cs.kun.nl [131.174.33.129]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id JAA01349 for ; Tue, 19 Jan 1999 09:49:42 +0100 (MET) Received: (from tews@localhost) by irritatie.cs.kun.nl (8.8.7/8.8.7) id JAA12869; Tue, 19 Jan 1999 09:50:03 +0100 Date: Tue, 19 Jan 1999 09:50:03 +0100 Message-Id: <199901190850.JAA12869@irritatie.cs.kun.nl> From: Hendrik Tews MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: caml-list@inria.fr Subject: Re: Problem binding type parameters in modules In-Reply-To: <199901161221.NAA00134@miss.wu-wien.ac.at> References: <199901161221.NAA00134@miss.wu-wien.ac.at> X-Mailer: VM 6.22 under 19.15 XEmacs Lucid Sender: weis Hi, My problem (example code): [omitted] What about using abstraction? eg module type FOO1 = sig type 'a foo val empty : unit -> 'a foo end module Bar : FOO1 = struct type 'a foo = 'a list Lazy.t let empty () = lazy [] end Then empty is a function and its type gets generelized. The "'a" specified in "empty" is still not the same as in "'a foo". I have The section about type checking in the list of "Frequently asked Questions about Caml" (http://caml.inria.fr/FAQ/FAQ_EXPERT-eng.html) explains the differences between 'a and '_a. Bye, Hendrik