[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Marc Lasson <titmarc@f...> |
| Subject: | Re: [Caml-list] OO syntax extension |
Jacques Garrigue wrote:
>OO syntax extension
> Some camlp4 syntax extensions to write more compact code using
> objects. The new syntaxes are
> * val [mutable] x = expr with (reader|writer|accessor)
> generates code for an x and a set_x method, like in ruby.
> * obj#x <- expr
> generates a call to the set_x method.
> * {| [mutable] f1 = expr1; ...; [mutable] fn = exprn |}
> generates an immediate object with the above fields and the
> corresponding accessor methods. You may also include inherit
> declarations.
>
I am very interested in your OO syntax extension but i did not succeed
to compile it.
I get the following error:
marc@georgie:~$ ocamlc -I +camlp4 -c -pp 'camlp4o pa_extend.cmo
q_MLast.cmo' pa_oo.ml
File "pa_oo.ml", line 12, characters -249--249:
Unbound value loc
The error's position looks very weird. Since i can't speak camlp4, i'm
unable to fix it.
Is it serious doctor ?
--
Marc Lasson.
marc@georgie:~$ ocamlc -v && camlp4o -v
The Objective Caml compiler, version 3.08.2
Standard library directory: /usr/lib/ocaml/3.08
Camlp4 version 3.08.2