caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Grégoire Sutre" <sutre@labri.fr>
To: caml-list@inria.fr
Subject: [Caml-list] Error compiling classes with ocamlcp?
Date: Tue, 26 Nov 2002 20:25:48 +0100	[thread overview]
Message-ID: <20021126192549.F40547E76@iona.labri.fr> (raw)

Hi,

I got an error trying to compile an OCaml file with profiling support.  I 
believe the problem arises from the use of objects in my code.

On the following simple OCaml source:


class my_class =
object
  method do_nothing = ()
end


The command "ocamlcp -c ocamlcp-pb.ml" gives:

File "/home/sutre/tmp/camlppc6dad0", line 1, characters 29-33:
Syntax error

And the generated camlppc6dad0 file is as follows:


let __ocaml_prof_cnt_ocamlcp-bug_ = Array.create 0000001 0;; 
Profiling.counters := ("ocamlcp-bug", ("fm", __ocaml_prof_cnt_ocamlcp-bug_)) 
:: !Profiling.counters;; class my_class =
object
  (__ocaml_prof_cnt_ocamlcp-bug_.(0) <- Pervasives.succ 
__ocaml_prof_cnt_ocamlcp-bug_.(0); method do_nothing = ())
end


This generated file indeed doesn't compile with ocamlc.  I am using the OCaml 
distribution version 3.06.  Doesn't ocamlcp support objects?


Thanks for your help,

Gregoire Sutre.
-------------------
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


             reply	other threads:[~2002-11-26 19:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-26 19:25 Grégoire Sutre [this message]
2002-11-27 13:02 ` Damien Doligez
2002-11-27 14:03   ` [Caml-list] OCAMAWEB release lehalle@miriad
2002-11-27 19:16   ` [Caml-list] Error compiling classes with ocamlcp? Grégoire Sutre

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=20021126192549.F40547E76@iona.labri.fr \
    --to=sutre@labri.fr \
    --cc=caml-list@inria.fr \
    /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;
as well as URLs for NNTP newsgroup(s).