* [Caml-list] Error compiling classes with ocamlcp?
@ 2002-11-26 19:25 Grégoire Sutre
2002-11-27 13:02 ` Damien Doligez
0 siblings, 1 reply; 4+ messages in thread
From: Grégoire Sutre @ 2002-11-26 19:25 UTC (permalink / raw)
To: caml-list
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Error compiling classes with ocamlcp?
2002-11-26 19:25 [Caml-list] Error compiling classes with ocamlcp? Grégoire Sutre
@ 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
0 siblings, 2 replies; 4+ messages in thread
From: Damien Doligez @ 2002-11-27 13:02 UTC (permalink / raw)
To: Grégoire Sutre; +Cc: caml-list
On Tuesday, Nov 26, 2002, at 20:25 Europe/Paris, Grégoire Sutre wrote:
> class my_class =
> object
> method do_nothing = ()
> end
>
> The command "ocamlcp -c ocamlcp-pb.ml" gives:
[...]
> This generated file indeed doesn't compile with ocamlc. I am using
> the OCaml
> distribution version 3.06. Doesn't ocamlcp support objects?
There are two problems here:
1. A known bug (PR#1464) fixed in the working version. Mail me if you
want a specific patch.
2. You called your file "ocamlcp-pb.ml", which is incorrect. O'Caml
uses
the capitalized file name as the module name for this file, thus all
O'Caml source file names must be alphanumeric and start with a
lowercase
letter. Otherwise, you will run into problems sooner or later.
-- Damien
-------------------
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Caml-list] OCAMAWEB release
2002-11-27 13:02 ` Damien Doligez
@ 2002-11-27 14:03 ` lehalle@miriad
2002-11-27 19:16 ` [Caml-list] Error compiling classes with ocamlcp? Grégoire Sutre
1 sibling, 0 replies; 4+ messages in thread
From: lehalle@miriad @ 2002-11-27 14:03 UTC (permalink / raw)
To: caml-list
We just release OCAMAWEB in GPL licence at sourceforge http://ocamaweb.sf.net
OCAMAWEB is a software that produce LaTeX documentation on MATLAB files with some special comments.
It is written in OCAML.
It is a literate programming tool.
MIRIAD Technologies decided to put it avalable to the ocaml and matlab community.
I hope you will use it and send us comments.
charles
---
Charles-Albert Lehalle --- MIRIAD Technologies
Responsable Développements Algorithmiques et Applications
mailto:charles.lehalle@miriadtech.com
tel : 0156431816 - fax: 0156431828
8 av Hoche - 75008 PARIS - FRANCE
-------------------
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Error compiling classes with ocamlcp?
2002-11-27 13:02 ` Damien Doligez
2002-11-27 14:03 ` [Caml-list] OCAMAWEB release lehalle@miriad
@ 2002-11-27 19:16 ` Grégoire Sutre
1 sibling, 0 replies; 4+ messages in thread
From: Grégoire Sutre @ 2002-11-27 19:16 UTC (permalink / raw)
To: Damien Doligez; +Cc: caml-list
On Wednesday 27 November 2002 14:02, you wrote:
> On Tuesday, Nov 26, 2002, at 20:25 Europe/Paris, Grégoire Sutre wrote:
> > class my_class =
> > object
> > method do_nothing = ()
> > end
> >
> > The command "ocamlcp -c ocamlcp-pb.ml" gives:
>
> [...]
>
> > This generated file indeed doesn't compile with ocamlc. I am using
> > the OCaml
> > distribution version 3.06. Doesn't ocamlcp support objects?
>
> There are two problems here:
>
> 1. A known bug (PR#1464) fixed in the working version. Mail me if you
> want a specific patch.
Thanks. I don't need it right now (I was just playing around with it to
support it in my Makefile). I'll wait for the next release.
> 2. You called your file "ocamlcp-pb.ml", which is incorrect. O'Caml
> uses
> the capitalized file name as the module name for this file, thus all
> O'Caml source file names must be alphanumeric and start with a
> lowercase
> letter. Otherwise, you will run into problems sooner or later.
Oh, right. I actually changed this file's name when trying to pinpoint the
problem...
Thanks for the quick and efficient answer,
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-11-28 9:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-26 19:25 [Caml-list] Error compiling classes with ocamlcp? Grégoire Sutre
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox