From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 012F0BC69 for ; Mon, 30 Oct 2006 13:51:31 +0100 (CET) Received: from pih-relay06.plus.net (pih-relay06.plus.net [212.159.14.133]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k9UCpVxW023835 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Mon, 30 Oct 2006 13:51:31 +0100 Received: from [80.229.56.224] (helo=[10.0.0.5]) by pih-relay06.plus.net with esmtp (Exim) id 1GeWby-0005Hb-Hm for caml-list@yquem.inria.fr; Mon, 30 Oct 2006 12:51:30 +0000 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] class and printf Date: Mon, 30 Oct 2006 12:49:41 +0000 User-Agent: KMail/1.9.5 References: <20061030124223.GA46814@ermine.home> In-Reply-To: <20061030124223.GA46814@ermine.home> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610301249.41667.jon@ffconsultancy.com> X-Miltered: at concorde with ID 4545F553.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; printf:01 foo:01 myprintf:01 printf:01 fprintf:01 compiler:01 myprintf:01 foo:01 fprintf:01 ocaml:01 drink:98 frog:98 unbound:01 wrote:01 compile:01 On Monday 30 October 2006 12:42, Anastasia Gornostaeva wrote: > What I need to drink to compile it? > > class foo ch = > object > method myprintf = Printf.fprintf ch > end > > The compiler says > The method myprintf has type ('a, out_channel, unit) format -> 'a where 'a > is unbound Bind 'a: # class ['a] foo ch = object method f : ('a, out_channel, unit) format -> 'a = Printf.fprintf ch end;; class ['a] foo : out_channel -> object method f : ('a, out_channel, unit) format -> 'a end -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists