Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Ken Rose <kenrose@tfb.com>
To: g.o.d@zefix.tv
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] newbie problem with splitting code into files
Date: Fri, 23 May 2003 07:38:40 -0700	[thread overview]
Message-ID: <3ECE3270.A8FE5423@tfb.com> (raw)
In-Reply-To: <20030523124814.GD5371@sfear.sc-networks.de>

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:

<snipped example>

> 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


      parent reply	other threads:[~2003-05-23 14:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-23 12:48 g.o.d
2003-05-23 14:21 ` Xavier Leroy
2003-05-23 21:17   ` [Caml-list] Camlp4 for newbies TBraibant
2003-05-23 14:38 ` Ken Rose [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3ECE3270.A8FE5423@tfb.com \
    --to=kenrose@tfb.com \
    --cc=caml-list@inria.fr \
    --cc=g.o.d@zefix.tv \
    --cc=rose@acm.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox