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 QAA18611; Fri, 23 May 2003 16:38:46 +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 QAA18516 for ; Fri, 23 May 2003 16:38:44 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from clusterB2.tfb.com (clusterb2.tfb.com [65.126.210.71]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h4NEcgT19575 for ; Fri, 23 May 2003 16:38:42 +0200 (MET DST) Received: from tfb.com (host-66-81-193-196.rev.o1.com [66.81.193.196]) by clusterB2.tfb.com (8.12.5/8.12.5) with ESMTP id h4NEcEZi014614; Fri, 23 May 2003 07:38:15 -0700 Message-ID: <3ECE3270.A8FE5423@tfb.com> Date: Fri, 23 May 2003 07:38:40 -0700 From: Ken Rose Reply-To: rose@acm.org X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686) X-Accept-Language: en MIME-Version: 1.0 To: g.o.d@zefix.tv CC: caml-list@inria.fr Subject: Re: [Caml-list] newbie problem with splitting code into files References: <20030523124814.GD5371@sfear.sc-networks.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; caml-list:01 newbie:01 mli:01 ocaml:01 match:02 compile:02 objects:02 wrote:03 interface:03 refuses:03 let:04 functional:06 type:07 problem:07 slowly:07 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk g.o.d@zefix.tv wrote: > > Hello, > > i am a bloody ocaml newbie. i have big problems with learning > ocaml as my brain refuses to thing functional... is get better slowly. It took me a while, too. > i studied several documentation sources but i was not able to find > a solution for the following problem: > as long as i keep this in one file it works. > so what i did now is splitting it up, putting > class type declaration into test.mli, putting > class declaration into test.ml and putting > let main()... into main.ml > > when i now compile test.mli followed by test.ml, > i get error messages like: > > The implementation test.ml does not match the interface test.cmi: > The field `#test_type' is required but not provided > The field `test_type' is required but not provided > > So what am i doing wrong? I haven't done anything with objects in ocaml, but when I see errors of that sort, it means that the cmi file is stale and I need to do "make clean; make". That usually clears it up for me. Good luck - ken ------------------- 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