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 MAA00609; Mon, 22 Apr 2002 12:10:49 +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 MAA00599 for ; Mon, 22 Apr 2002 12:10:48 +0200 (MET DST) Received: from mailhost.utu.fi (mailhost.utu.fi [130.232.1.5]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g3MAAlT16812 for ; Mon, 22 Apr 2002 12:10:47 +0200 (MET DST) Received: from utu.fi (glubimox.yok.utu.fi [130.232.134.107]) by mailhost.utu.fi (Postfix) with ESMTP id 11B824BD9; Mon, 22 Apr 2002 13:10:47 +0300 (EET DST) Message-ID: <3CC3E199.F6142F60@utu.fi> Date: Mon, 22 Apr 2002 13:10:33 +0300 From: Sami =?iso-8859-1?Q?M=E4kel=E4?= Organization: - X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i686) X-Accept-Language: en MIME-Version: 1.0 To: Frederic Tronel Cc: caml-list@inria.fr Subject: Re: [Caml-list] Problem with parametric classes References: <3CC3CD45.E6D6E166@inrialpes.fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Frederic Tronel wrote: > I'm using Ocaml 3.04 (plus a patch applied to circumvent a > problem with parametric classes bug id 841). > > I'm trying to compile the following piece of code (more > precisely, this is a significant excerpt of the faulty code). > which fails with the following error: > > File "essai.ml", line 71, characters 5-491: > The abbreviation specElement expands to type > < get_ident : int; get_name : string; mytype : specelement; > recv : string * comm list -> string * string list -> unit; > send : comm -> string -> unit; set_ident : int -> unit; > set_name : string -> unit > > but is used with type < get_ident : int; set_ident : int -> unit; .. > [...] > > What is the problem ??? > It does compile if I comment out send and recv methods of class > specElement. > Any help would be really appreciated. > This is the same problem as "What does this mean?" thread last week. The type of "countingObjects" would become < get_ident : int; get_name : string; mytype : specelement; recv : string * comm list -> string * string list -> unit; send : comm -> string -> unit; set_ident : int -> unit; set_name : string -> unit > countingObjects, but type comm is defined after countingObjects. The solution is to move the definition of countingObjects. ------------------- 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