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 UAA28493; Tue, 6 Jul 2004 20:23:43 +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 UAA28301 for ; Tue, 6 Jul 2004 20:23:39 +0200 (MET DST) Received: from mailout01.sul.t-online.com (mailout01.sul.t-online.com [194.25.134.80]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i66INcEV010928 for ; Tue, 6 Jul 2004 20:23:38 +0200 Received: from fwd05.aul.t-online.de by mailout01.sul.t-online.com with smtp id 1BhubS-0001Kw-01; Tue, 06 Jul 2004 20:23:38 +0200 Received: from t-online.de (rIQ6a4ZbYeJ0MOJVhqZsmYYpw++xa+2I6ovGvaR9fuiDiD7uOdfqgG@[217.82.235.35]) by fwd05.sul.t-online.com with esmtp id 1BhubI-1jWwl60; Tue, 6 Jul 2004 20:23:28 +0200 Message-ID: <40EAEE20.2010805@t-online.de> Date: Tue, 06 Jul 2004 20:23:28 +0200 From: szegedy@t-online.de (Christian Szegedy) User-Agent: Mozilla Thunderbird 0.5 (X11/20040611) X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list Subject: [Caml-list] Polymorphic method problem Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Seen: false X-ID: rIQ6a4ZbYeJ0MOJVhqZsmYYpw++xa+2I6ovGvaR9fuiDiD7uOdfqgG X-Miltered: at nez-perce with ID 40EAEE2A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; polymorphic:01 compile:02 unit:03 unit:03 object:03 equivalent:05 problem:07 fun:08 self:10 self:10 convenient:11 code:15 method:16 method:16 christian:16 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Can anyone tell me, why does the following piece of code fail to compile, and how can I achieve equivalent effect in the most convenient way? class a () = object(self) method f : 'a. ((< f : unit; .. > as 'a) -> unit) = fun other -> other#f method g = (self :> a) end Thanks in advance! ------------------- 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