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 VAA20339; Wed, 12 May 2004 21:12:04 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA20142 for ; Wed, 12 May 2004 21:12:03 +0200 (MET DST) From: briand@aracnet.com Received: from citrine.spiritone.com (citrine.spiritone.com [216.99.193.133]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i4CJC1SH011509 for ; Wed, 12 May 2004 21:12:02 +0200 Received: from soggy.deldotd.com (216-99-206-32.cust.aracnet.com [216.99.206.32]) by citrine.spiritone.com (8.12.10/8.12.8) with ESMTP id i4CJBwrF007058; Wed, 12 May 2004 12:11:58 -0700 Received: from briand by soggy.deldotd.com with local (Exim 3.36 #1 (Debian)) id 1BNz93-00027f-00; Wed, 12 May 2004 12:11:57 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16546.30461.763154.597490@soggy.deldotd.com> Date: Wed, 12 May 2004 12:11:57 -0700 To: Damien Cc: caml-list@inria.fr Subject: Re: [Caml-list] 'b is unbound In-Reply-To: <20040512134350.7be8c813.Damien.Pous@ens-lyon.fr> References: <16545.50388.591926.577605@soggy.deldotd.com> <20040512134350.7be8c813.Damien.Pous@ens-lyon.fr> X-Mailer: VM 6.92 under Emacs 21.2.1 X-Miltered: at concorde with ID 40A27701.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 damien:01 damien:01 ens-lyon:01 2004:99 inference:01 intending:01 toto:01 toto:01 bigarray:01 bigarray:01 int:01 writes:01 declaring:01 polymorphic:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >>>>> "Damien" == Damien writes: Damien> On Tue, 11 May 2004 23:31:48 -0700 briand@aracnet.com wrote: >> I'm getting the following error: >> >> method op : >> (float, 'a, 'b) Bigarray.Array2.t -> >> float array -> float array -> unit >> end >> The method op has type >> (float, 'a, 'b) Bigarray.Array2.t -> float array -> float array -> >> unit >> where 'b is unbound >> >> Is 'b really unbound, or is the inferencer simply unable to figure out >> what the type should be ? Damien> polymorphic methods require to be explicitly typed Damien> (this kind of type inference should lead to the one for system F) I'm not intending the method to be polymorphic. op is simply a method which takes a Bigarray.Array2 type as an argument. So it would seem that declaring the argument explicitly should solve the problem. Damien> # class o = object method id: 'a.'a -> 'a = fun x -> x end;; Damien> class o : object method id : 'a -> 'a end Damien> # let o = new o in o#id 5, o#id "toto";; Damien> - : int * string = (5, "toto") Here you are making the argument and return types consistent. I believe that my problem is different. It doesn't help that I don't understand what the problem is... Brian ------------------- 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